Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2025485imm; Thu, 14 Jun 2018 07:38:32 -0700 (PDT) X-Google-Smtp-Source: ADUXVKI27YIVXZwQJpETepnf5Su/vIA4ljuvuQE8d8RFSstD32vMBAOWuXfTfvvkzTCBX09bRYPC X-Received: by 2002:a63:bf49:: with SMTP id i9-v6mr2587697pgo.342.1528987112243; Thu, 14 Jun 2018 07:38:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528987112; cv=none; d=google.com; s=arc-20160816; b=xcCRBWjWm3+/ChlW955eVYy6PKHZUxs+qw5X0ezqJx9+/N+8Aw7drqHY5FOLtc7ynF sHujAOW12BqYItjzfC+kO35j6MXprepzMrTuMkGEjvnn+NfJcBouPPr+9A/xU0ZFJmDc tfvBroZSzsiEj03Q5jJnUz5ZzQ03+s1+FUqYv6QXgL04Ei3LE5tr+O23Bx8B6T9VmC4J JJgS7Mltj+stZzg4Ekx+YcoXODWVoMe1XMumusMDUdXC+kEqHadu+cyi44Dc8RDanR5V pEhWaNpwQVyu6VSYyggz1VcsN8zYbKzw6Ys9OUJTxY8WDKSjZP0KegR4LbjbTDhuwsJp TLJA== 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=2So+3ljRdLSAwb69BSmH3Z+I95gnknoSzzwM8z7wSkU=; b=YB9khe5PZLPxtNakzFFMHVzv9SbhDMwkwixbzlVw/UUB6QL0yWvdz6f5ymkJYAGXH5 UUDUr1fa4MJxW+K4LFsMzs/8/W7/C6WHcv01TOmG9tJRj0d+A5XWRakPiFCWWUAzlgSH puIWaHlO7N/qxz4dcg/Ango/ZJylF5FM9orSKdi+78y/z5NujHOmsO5wsPG6Upynfbr5 2B+uBNyo/xBNFm2mwIj3I4084CG2h7Tl56zASNjBrTD/CiQVR6ZHnaBiIzGGa+pHsbHG VROcIDf7NGX1Lbjk2JtYzr/D0mvrdrlGj0fGcHfpNMqQ3Rdy+GGl9efNTj9ko6HBB3PS nOSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@efficios.com header.s=default header.b=uSeA7nyU; 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 y10-v6si5163105pfm.162.2018.06.14.07.38.18; Thu, 14 Jun 2018 07:38:32 -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=uSeA7nyU; 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 S965690AbeFNOgW (ORCPT + 99 others); Thu, 14 Jun 2018 10:36:22 -0400 Received: from mail.efficios.com ([167.114.142.138]:45824 "EHLO mail.efficios.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965108AbeFNOgT (ORCPT ); Thu, 14 Jun 2018 10:36:19 -0400 Received: from localhost (ip6-localhost [IPv6:::1]) by mail.efficios.com (Postfix) with ESMTP id BFEF91AC96F; Thu, 14 Jun 2018 10:36:18 -0400 (EDT) Received: from mail.efficios.com ([IPv6:::1]) by localhost (mail02.efficios.com [IPv6:::1]) (amavisd-new, port 10032) with ESMTP id h-5uerIsT4if; Thu, 14 Jun 2018 10:36:18 -0400 (EDT) Received: from localhost (ip6-localhost [IPv6:::1]) by mail.efficios.com (Postfix) with ESMTP id 757861AC96C; Thu, 14 Jun 2018 10:36:18 -0400 (EDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.efficios.com 757861AC96C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=efficios.com; s=default; t=1528986978; bh=2So+3ljRdLSAwb69BSmH3Z+I95gnknoSzzwM8z7wSkU=; h=Date:From:To:Message-ID:MIME-Version; b=uSeA7nyUVNcT7vH5wjYWgE3fnZa+hPb6qZ5zPvc4VdGdcBM8Wynx4HL5gNxRJNUYB lIGe/5TepIkUwugfMbptsb97yNLbv0EjBFo9xM2MTlsT4vcS1WwZmb8o2uVhiHRXIN iA4OzSgkC9AY5p2KrtXTZAT7szG11fxCFmBCgak354Bh1DzgUGemIQdCYZPV1C1+Ze JklNdaGvnYREbiKI+DTAdQKJkpymQcexAuVEikrHiBBpzCG3WKOyK81q7XOReBaRh8 SJ+gLxQE94T5oVPql1w5P+GZF2DfrUxixfabKu0JiVtUY/OJbwqjSQjmXpAHixCA0v ebKICZjOQVZeA== 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 s2h6evubCwkS; Thu, 14 Jun 2018 10:36:18 -0400 (EDT) Received: from mail02.efficios.com (mail02.efficios.com [167.114.142.138]) by mail.efficios.com (Postfix) with ESMTP id 5F2111AC962; Thu, 14 Jun 2018 10:36:18 -0400 (EDT) Date: Thu, 14 Jun 2018 10:36:18 -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: <263666353.13077.1528986978282.JavaMail.zimbra@efficios.com> In-Reply-To: <48a0d905-2568-51b8-80c9-a20ecaa25f9b@redhat.com> 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> 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: MjPvCH86nvU2YiJ9sNEdiK56YHV4+Q== 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: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. Thanks, Mathieu -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com