Received: by 10.213.65.68 with SMTP id h4csp1798280imn; Thu, 29 Mar 2018 11:13:21 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+XydqteGc51kgDuGP4TeEpFTRBxCjtGTuWhjlPgumdavUdVwOBcNHjUDgRTrVpjkBRwO8V X-Received: by 10.101.93.2 with SMTP id e2mr6226779pgr.100.1522347201501; Thu, 29 Mar 2018 11:13:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522347201; cv=none; d=google.com; s=arc-20160816; b=BJB4ja00sZOxw+Waen7nl30Hszn76QxAX4JhzgpBOsT+kkVvZ9ZOD/IQZYt6nhu2Zg rp49A9dN9dHA5ZXqN8a5zX5UnadroAx0F73cPzPR8p92kjJxTznx3nqqCF84gHdxzayV 6ZM3KsGyL7jHOV/J1Pdjmibm0FoSLxwLxpfTXT48O4wJAUH4n7WpH2HGQiks6m2Z3WpX Y/xxCumxvuB6V+eCExTjksK3Ol/+PQ83YPy1vctEL8wfa9A4m7hofQUt2DXYwh3x1hPa gpABNSQ0eCSY5Kc9+UjawcI7dfHARptR0k5xNE6zGH5s/x3Lk/3wM/J/tdzF1qE6TtMq gzjw== 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:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dmarc-filter:arc-authentication-results; bh=oojPG6R7Ki1YMYANv60bXUOXsWv6k1YYnrBOMwoHS1Q=; b=yRQQIIb+2FWOmGW1I7secQ3Se3x51RCXcH0dAKGnc7+2e8SbhOT2vuomndD6onHk7q OIxZLIG9MCUlOde1lIODXlluum+GD6sMqAiK70Hd213EHVrDxLsXaAQ4B2F7sdkIB3Id Q0Ub/wMc65KqpuEkdHf5dP6JQfawiUxmquSqJ9co+S+mt1sB/zgXeVeML94niS6qYEZL 7QfCKjqIR4D4pmz2GkBilLHaLT8AjR1LeaokmymXWQ54ESPLxeeruKp47b0UgDN+3JYM Q/8IEFm1JxliuCno1b9AUvEkZHh0E7E66KI0b2n9CzaLGlq06gdZfUSmWhTzppYJ9cS4 31kw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d25-v6si1628488plj.13.2018.03.29.11.13.07; Thu, 29 Mar 2018 11:13:21 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754178AbeC2SH7 (ORCPT + 99 others); Thu, 29 Mar 2018 14:07:59 -0400 Received: from mail.kernel.org ([198.145.29.99]:40836 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754158AbeC2SH4 (ORCPT ); Thu, 29 Mar 2018 14:07:56 -0400 Received: from gandalf.local.home (cpe-66-24-56-78.stny.res.rr.com [66.24.56.78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id BDAFE21777; Thu, 29 Mar 2018 18:07:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BDAFE21777 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=goodmis.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=rostedt@goodmis.org Date: Thu, 29 Mar 2018 14:07:52 -0400 From: Steven Rostedt To: Mathieu Desnoyers Cc: Peter Zijlstra , Thomas Gleixner , "Paul E. McKenney" , Boqun Feng , Andy Lutomirski , Dave Watson , linux-kernel , linux-api , Paul Turner , Andrew Morton , Russell King , Ingo Molnar , "H. Peter Anvin" , Andrew Hunter , Andi Kleen , Chris Lameter , Ben Maurer , Josh Triplett , Linus Torvalds , Catalin Marinas , Will Deacon , Michael Kerrisk , Alexander Viro Subject: Re: [RFC PATCH for 4.17 02/21] rseq: Introduce restartable sequences system call (v12) Message-ID: <20180329140752.12661138@gandalf.local.home> In-Reply-To: <21903915.856.1522346553810.JavaMail.zimbra@efficios.com> References: <20180327160542.28457-1-mathieu.desnoyers@efficios.com> <20180328174935.GK4082@hirez.programming.kicks-ass.net> <181076499.279.1522268382303.JavaMail.zimbra@efficios.com> <87410797.545.1522331641598.JavaMail.zimbra@efficios.com> <20180329142338.GD4043@hirez.programming.kicks-ass.net> <544124089.623.1522337940950.JavaMail.zimbra@efficios.com> <20180329122439.4a909c72@gandalf.local.home> <21903915.856.1522346553810.JavaMail.zimbra@efficios.com> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 29 Mar 2018 14:02:33 -0400 (EDT) Mathieu Desnoyers wrote: > Currently, anyone using ptrace on a process has pretty much given up all > hopes of performance. Processes will use rseq to gain performance, not the > opposite, so this deterioration will be unwelcome. The ptrace path has nothing to do with ptrace anymore, and probably be hard to notice the performance hit. You simply set a TIF flag, and on exit of the syscall it jumps to a path that checks special cases (tracing system calls being one of them). It's called the ptrace path because ptrace was the first one to use it (I'm guessing, I haven't actually looked at the history). This is used to add any system call checks that are not done during normal operation. And this certainly falls under that category. -- Steve