Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2061597imm; Thu, 14 Jun 2018 08:10:26 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLC8GgTPUB1hjdXN+0k5/zRL6ogZT7YTGNhu7zBqcdPriiRNQL4vbnQ2JwTMoDy0xtmDkn8 X-Received: by 2002:a65:4bcd:: with SMTP id p13-v6mr2685965pgr.114.1528989026432; Thu, 14 Jun 2018 08:10:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528989026; cv=none; d=google.com; s=arc-20160816; b=NwnchgnQk1IQHKSw6giHp4twx9E0YGXUhmUXtOrgIFbJyBGoUTazTWwXHhgGv20gCo E38abT2nINlgZzHNgXZRVHpRQCDEX0TDUtt4KKWd3EU3aI5kSUi5uvAGfTJINBI1A5il rOUFtI+P77rNvXOyeY4QeGIqgQ+TWZJoGl34AzwDkq8+4MzLcz6IK7hOudB8v3dqarxn HWWf/Ao9gzTIoe//8V19Pg2ufMAziPS+1LiCnpxzJeqYDjLctGPHukG9Kei/BCOLeZoQ WHkgH24EhqM2AlKZG087WizKDziHB+2CEtD7Gufl/o02dWmjQP0s0ZSuLCzulUeVBY3j ZXbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:thread-index:thread-topic :content-transfer-encoding:mime-version:subject:references :in-reply-to:message-id:cc:to:from:date:dkim-signature:dkim-filter :arc-authentication-results; bh=Qr000X5fF09c5gGkjPUH3kyUl/xYPqvnb48JjkTHZwk=; b=luQaqx5cvvYdhgnmwDet84pacKOra2QDhbUSqz00uMZEmRdk/uYK5UAcIAkhlW6g+M tFanfM73JW/t7Hw5gCzp0jKnlbQ9pxnreGm5zIFWbrX2UDDvgO0aUJFDimcbPv0YGR5h 6G8HFfScUVFdFykZnNij2lJAAiqUaobcgI49T1L11aOmYooEw1H1BqO37o6DO7dS6BQ/ eol38tKSGsAwpYK4PDMB8DFHJ+GR8+qx42aWUGD7GaR4vMUak3N1LNT0Ig09fllONYLR mFG2CYymLHoQmSA071QLJNWNKRYwG8banOeB3zMfKCjUDLm83RJO3iOvu94W4H3InrUC BFKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@efficios.com header.s=default header.b=Uss1zP9q; 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=pass (p=NONE sp=NONE dis=NONE) header.from=efficios.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c7-v6si5261194plo.47.2018.06.14.08.10.12; Thu, 14 Jun 2018 08:10:26 -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; dkim=pass header.i=@efficios.com header.s=default header.b=Uss1zP9q; 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=pass (p=NONE sp=NONE dis=NONE) header.from=efficios.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755287AbeFNPJp (ORCPT + 99 others); Thu, 14 Jun 2018 11:09:45 -0400 Received: from mail.efficios.com ([167.114.142.138]:47546 "EHLO mail.efficios.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754914AbeFNPJo (ORCPT ); Thu, 14 Jun 2018 11:09:44 -0400 Received: from localhost (ip6-localhost [IPv6:::1]) by mail.efficios.com (Postfix) with ESMTP id 6E2C322A16D; Thu, 14 Jun 2018 11:09:43 -0400 (EDT) Received: from mail.efficios.com ([IPv6:::1]) by localhost (mail02.efficios.com [IPv6:::1]) (amavisd-new, port 10032) with ESMTP id IVj6pLreATBP; Thu, 14 Jun 2018 11:09:43 -0400 (EDT) Received: from localhost (ip6-localhost [IPv6:::1]) by mail.efficios.com (Postfix) with ESMTP id EB9E722A162; Thu, 14 Jun 2018 11:09:42 -0400 (EDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.efficios.com EB9E722A162 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=efficios.com; s=default; t=1528988983; bh=Qr000X5fF09c5gGkjPUH3kyUl/xYPqvnb48JjkTHZwk=; h=Date:From:To:Message-ID:MIME-Version; b=Uss1zP9qUdOdFqiBRi6S03ZP5/RMWiTMpwkM5syNt3k9jDIWa8t9N0FXoD5qK+RSX xh+G1TugXPUKzSorYlGHfwUCQz+wLiFvBd+tPGjnOOM83G9KSrdNQaa/Qp5QwMVaUH +gf6O4ErJ57srTneOn7KNAibBkipWoflmzgU4Os7EupXia22j3KPf4IMZezwIkO6Av BmaeWU++Vpchr9ntxaZm6LqCRCGw4ATDS9n5yh+jLUUoX/pY/mPvYcN8qx/y4CVJbv oT8SdM/PP3Ct0VwfUPP/wHvJ6Ouq3k28HwA29xgJAblB1QaZsVIFYqs42+nIZuc5cd 6veNxBzjyIxag== X-Virus-Scanned: amavisd-new at efficios.com Received: from mail.efficios.com ([IPv6:::1]) by localhost (mail02.efficios.com [IPv6:::1]) (amavisd-new, port 10026) with ESMTP id 4F2ydC12DOuI; Thu, 14 Jun 2018 11:09:42 -0400 (EDT) Received: from mail02.efficios.com (mail02.efficios.com [167.114.142.138]) by mail.efficios.com (Postfix) with ESMTP id D496622A158; Thu, 14 Jun 2018 11:09:42 -0400 (EDT) Date: Thu, 14 Jun 2018 11:09:42 -0400 (EDT) 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-Originating-IP: [167.114.142.138] X-Mailer: Zimbra 8.8.8_GA_2096 (ZimbraWebClient - FF52 (Linux)/8.8.8_GA_1703) Thread-Topic: Restartable Sequences system call merged into Linux Thread-Index: DgCPD0mMBSqpQL39QHF+/AHtQ6/3dw== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ----- 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