Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2029689imm; Thu, 14 Jun 2018 07:42:46 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLjlLCWvsxZfoSnUDTtNj1+LBxGRjigiWMroxwOpGMORGZPdtv9E+3Duhzit0LFwYNPjcw0 X-Received: by 2002:a65:4c87:: with SMTP id m7-v6mr2629915pgt.364.1528987366761; Thu, 14 Jun 2018 07:42:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528987366; cv=none; d=google.com; s=arc-20160816; b=NZ6GdSQWRyOscq+hEn7WWjA9+duLvpQeOzwpFOFwdiOfrsGCh/Zj2VUvfeA1hYQr5K FS/flZ9bT1pFRYJmmMKat4sN/eO3kfeCoAY4mk259gs9sUx+JSRwdO5KOJM583UYqUwk PzSAiisvVoniFIx1Pkp3vV0OuPXZpWENTuPsFt3HTkadQ1zLlQGybab/uXJSd68qjq4h NQL6DDC/oPXNgGtlh9goUd6xqS3h/wcABx7lRIcuvQF1dGXbGZ60rjTeMwUJhPVoj0YS H0rTVk7KyMpqJRx2Rh112N+/nggPNrnGz0+z8+9+3MHscqDIV4McUggFAVJ/pAJu2rbI alBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=AltqO8ZEQrVTPGrWuOzqIzoc0Yi9+DVWFFXsMW9DBGI=; b=0Qjuw7+cLL496Kxxznnpzxpd78rfNcVXkeOhkgkFJ+hZPjViB29Y/2K1Ods5TMIdc8 PObKP4pShFVyx0VPAxzrTEFlKAau9ULdhbl6hxh2PshQMlkkL1SAMhjEylTBf54zIf2a xbMcBDItFf1gLqedew2cSmkKuYwT3TfivT0m5hRaELgIM1N/ff8zrQdfbDEkNeeJCgzI s4DZlrhdOCM2IzzNt9a7pd0gYVwuRHI2YOsBQzxT2zygJTbaYaG6/H+l7rI7TPCWcWV6 nuzzc5kWU0KWCJujoqTZTBk3xKXRJzi1A/pqSVp037KR9e9+icabqg2S92Ujhzqm2XnU jv0Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d89-v6si5286429pfj.311.2018.06.14.07.42.32; Thu, 14 Jun 2018 07:42:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965211AbeFNOlv (ORCPT + 99 others); Thu, 14 Jun 2018 10:41:51 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:37868 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S964868AbeFNOlt (ORCPT ); Thu, 14 Jun 2018 10:41:49 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B90424070484; Thu, 14 Jun 2018 14:41:48 +0000 (UTC) Received: from oldenburg.str.redhat.com (ovpn-117-97.ams2.redhat.com [10.36.117.97]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 815F92166BB2; Thu, 14 Jun 2018 14:41:47 +0000 (UTC) Subject: Re: Restartable Sequences system call merged into Linux To: Mathieu Desnoyers Cc: Pavel Machek , carlos , Peter Zijlstra , "Paul E. McKenney" , Boqun Feng , Thomas Gleixner , linux-kernel , libc-alpha References: <1084280721.10859.1528746558696.JavaMail.zimbra@efficios.com> <417742741.11550.1528821084084.JavaMail.zimbra@efficios.com> <20180614122759.GB8798@amd> <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> From: Florian Weimer Message-ID: <21eae301-50ff-e95a-f3c7-dedcf2f66842@redhat.com> Date: Thu, 14 Jun 2018 16:41:46 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <263666353.13077.1528986978282.JavaMail.zimbra@efficios.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Thu, 14 Jun 2018 14:41:48 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Thu, 14 Jun 2018 14:41:48 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'fweimer@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Thanks, Florian