From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 121461 invoked by alias); 7 Oct 2019 18:32:57 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 121452 invoked by uid 89); 7 Oct 2019 18:32:57 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-6.0 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS autolearn=ham version=3.3.1 spammy=HX-Languages-Length:1526 X-HELO: mx1.redhat.com From: Florian Weimer To: Christian Brauner Cc: Adhemerval Zanella , libc-alpha@sourceware.org Subject: Re: [PATCH 4/5] linux: Optimize posix_spawn spurious sigaction calls References: <20190731183136.21545-1-adhemerval.zanella@linaro.org> <20190731183136.21545-4-adhemerval.zanella@linaro.org> <875zmg9xjr.fsf@oldenburg2.str.redhat.com> <4266b563-5433-8bb9-78a2-af0ff14cab59@linaro.org> <87ftlj6k69.fsf@oldenburg2.str.redhat.com> <87v9uavnzs.fsf@oldenburg2.str.redhat.com> <95503672-bc82-c0bc-0a30-5724644b0037@linaro.org> <20191007182526.qqmgziscbyxietve@wittgenstein> Date: Mon, 07 Oct 2019 18:32:00 -0000 In-Reply-To: <20191007182526.qqmgziscbyxietve@wittgenstein> (Christian Brauner's message of "Mon, 7 Oct 2019 20:25:27 +0200") Message-ID: <87eezoflt7.fsf@oldenburg2.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2019-10/txt/msg00160.txt.bz2 * Christian Brauner: >> >>>>> Maybe a CLONE_RESET_SIGNALS where the cloned process sets its signal >> >>>>> disposition to default SIG_IGN/SIG_DFL values may help us here. However >> >>>>> afaik clone now is out of space on 'flags' for newer ones (it already >> >>>>> defines 24 flags plus it reserve 8 bits for signal to be sent at process >> >>>>> exit) and it would take time to use this feature on glibc. >> >>>> >> >>>> Christian Brauner has been working on fixing this. >> >>> >> >>> Which strategy he is proposing? Even with proper kernel support, it would >> >>> take time to enable glibc to use it. >> >> >> >> Lots of flag arguments, with the reset of the arguments located >> >> indirectly via a pointer argument. >> >> >> >> For a pure optimization, I think it's not too bad to require kernel >> >> backports of system calls. > > So I just accidently caught wind of this discussion. :) Good. 8-) > I'm open to extending clone3() to support something like the above. > My new clone3() version has been released with Linux 5.3. It takes a > struct clone_args. The structure is versioned by size and thus - in > theory - extensible indefinitely. Christian, would you be able to implement the CLONE_RESET_SIGNALS flag for us? It should reset any handler which is not SIG_IGN or SIG_DFL to SIG_DFL. We'd also need a way to probe that the flag is supported, so that we can fall back to the current way of doing things otherwise. Thanks, Florian