From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20962 invoked by alias); 14 Jun 2018 15:09:47 -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 20081 invoked by uid 89); 14 Jun 2018 15:09:46 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-6.9 required=5.0 tests=BAYES_00,GIT_PATCH_2,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail.efficios.com DKIM-Filter: OpenDKIM Filter v2.10.3 mail.efficios.com EB9E722A162 Date: Thu, 14 Jun 2018 15:09:00 -0000 From: Mathieu Desnoyers To: Florian Weimer Cc: Pavel Machek , carlos , Peter Zijlstra , "Paul E. McKenney" , Boqun Feng , Thomas Gleixner , linux-kernel , libc-alpha Message-ID: <1898936021.13117.1528988982788.JavaMail.zimbra@efficios.com> In-Reply-To: <21eae301-50ff-e95a-f3c7-dedcf2f66842@redhat.com> References: <1084280721.10859.1528746558696.JavaMail.zimbra@efficios.com> <894222691.12973.1528981314012.JavaMail.zimbra@efficios.com> <20180614132557.GA15201@amd> <956816108.13001.1528983496098.JavaMail.zimbra@efficios.com> <20180614134959.GA4084@amd> <48a0d905-2568-51b8-80c9-a20ecaa25f9b@redhat.com> <263666353.13077.1528986978282.JavaMail.zimbra@efficios.com> <21eae301-50ff-e95a-f3c7-dedcf2f66842@redhat.com> Subject: Re: Restartable Sequences system call merged into Linux MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2018-06/txt/msg00416.txt.bz2 ----- On Jun 14, 2018, at 10:41 AM, Florian Weimer fweimer@redhat.com wrote: > On 06/14/2018 04:36 PM, Mathieu Desnoyers wrote: >> ----- On Jun 14, 2018, at 10:00 AM, Florian Weimer fweimer@redhat.com wrote: >> >>> On 06/14/2018 03:49 PM, Pavel Machek wrote: >>>> Hi! >>>> >>>>>>> - rseq_preempt(): on preemption, the scheduler sets the TIF_NOTIFY_RESUME thread >>>>>>> flag, so rseq_handle_notify_resume() can check whether it's in a rseq critical >>>>>>> section when returning to user-space, >>>>>>> - rseq_signal_deliver(): on signal delivery, rseq_handle_notify_resume() checks >>>>>>> whether it's in a rseq critical section, >>>>>>> - rseq_migrate: on migration, the scheduler sets TIF_NOTIFY_RESUME as well, >>>>>> >>>>>> Yes, this is not likely to be noticeable. >>>>>> >>>>>> But the proposal wanted to add a syscall to thread creation, right? >>>>>> And I believe that may be noticeable. >>>>> >>>>> Fair point! Do we have a standard benchmark that would stress this ? >>>> >>>> Web server performance benchmarks basically test clone() performance >>>> in many cases. >>> >>> Isn't that fork? I expect that the rseq arena is inherited on fork and >>> fork-type clone, otherwise it's going to be painful. >> >> On fork or clone creating a new process, the rseq tls area is inherited >> from the thread that does the fork syscall. >> >> On creation of a new thread with clone, there is no such inheritance. > > Makes sense. So fork-based (web) servers will not be impacted by the > additional system call, and thread-based servers likely use a thread > pool anyway. I'm not really concerned about the additional system call > here. Just for the sake of completeness, there is (of course) no inheritance on exec(). So glibc would also have to register the rseq TLS in its constructors. Thanks, Mathieu -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com