Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp3747366ybv; Mon, 10 Feb 2020 05:45:36 -0800 (PST) X-Google-Smtp-Source: APXvYqx6ZjI6mCZSX9KEu2Yf6hGf6DuoY87xX6LMvTilGuIe7T/DEC4S10UiOYiULPz/r9gtCJer X-Received: by 2002:aca:b1d5:: with SMTP id a204mr838711oif.82.1581342336698; Mon, 10 Feb 2020 05:45:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581342336; cv=none; d=google.com; s=arc-20160816; b=mbxcXWJoi8PG6K8khLeWXPq6hX2qHCD3LTUuqhw31j3OnCk9LbUjhpfwKX7IXR/RIE rUAwwaUHF8L2WTu04cDqAq9Da51+JKCXzVKz5L0B7yc5Lp6V6JttTLWieeWKy7EoQvU4 uK7gWV0WiSI8pzqq2170KrUVP7wUgRDs4O1Ggo0gZ+hX4XcPmZT2SG2vrbDZm3KHIJXu 3gl9TDhxcvA5q3EZmpAh9yGVqmZQ9Vh3Fu+2iTkdIqVAcMeru038yKOBVpWuFStO/890 s3AL7Fw4FFPJ+C8p5Bkwg0cmvIMuf32awfBn5kueyh0uebKwnDk7DvtBj+KoNo6769ux mAwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=nL1HBSQ6qLcMuvNZWsGlA8njZfsgNFQQf7UGR8jZzYI=; b=aKhPc9dAFIy1HmDpVA31OQMZNijkc+UEuGkt+iEp3xAliwrqdA4leFkx86Y5CUA+v3 v2zanPJdqs27Z0TjIPmQMvVb2SxINNRGRO0avHmr0d1wsx1OzxWXB6w5LMqEcoq+FBc9 sTbziuJ1el4QiFfBo9tQYlPpuQS/9chEoee0n31dujaTYMB38AyXi5D8slZ3xudDkclM gTaxWTmtfm/Hv+U775daKQfbVFiar8KS196E7cfPBbltcb+4IHrqMSeTrwmxli723C6D nCnDD+1o/98IlGjjwM4ElHmvIDdCnLrVB9VyKWVSctGRMjn3FGaR0DewxQRkZjI7Owpf yWXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=ZRMTR9zH; 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 h21si175790otk.196.2020.02.10.05.45.24; Mon, 10 Feb 2020 05:45:36 -0800 (PST) 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=fail header.i=@infradead.org header.s=merlin.20170209 header.b=ZRMTR9zH; 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 S1727879AbgBJNpP (ORCPT + 99 others); Mon, 10 Feb 2020 08:45:15 -0500 Received: from merlin.infradead.org ([205.233.59.134]:50500 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727417AbgBJNpO (ORCPT ); Mon, 10 Feb 2020 08:45:14 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=nL1HBSQ6qLcMuvNZWsGlA8njZfsgNFQQf7UGR8jZzYI=; b=ZRMTR9zHMMyaMiGOGCXpsEwBON FTR4GGptH+Q4+rjNao7cC8s93MBMwbxu0eOLedlxsd+/s/IYLIeDnxnJUhizq0oJyaCfeC3k5auvc Nu+6yYtTM6JwjDRvTlrhYWqFxAMSJ+6AO+NTSOCzEBInHJa+yTYTJtnm+5sNBZId+H6jrExvc6f3l Mp2CZKIjg70QvAx0Ui2F2Ay+5T0kBDdhSL+HMSXvTHJx//fp3qIRKkJBWDgaHlZMuv6+KqJ6jah0T 7SfCeylLNT8CduluOGg9FqfgwaX+ua7HM3AUsfWubyLaCsOAHQt/6MAm0/lXryGsDnKZAQgF+3W17 fz7PK00A==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1j19MY-0006kI-RY; Mon, 10 Feb 2020 13:44:35 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 96A2C300446; Mon, 10 Feb 2020 14:42:44 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id C501F208447BD; Mon, 10 Feb 2020 14:44:32 +0100 (CET) Date: Mon, 10 Feb 2020 14:44:32 +0100 From: Peter Zijlstra To: "Paul E. McKenney" Cc: Mathieu Desnoyers , "Joel Fernandes, Google" , linux-kernel , Greg Kroah-Hartman , "Gustavo A. R. Silva" , Ingo Molnar , Richard Fontana , rostedt , Thomas Gleixner , Josh Triplett , Lai Jiangshan , Arnaldo Carvalho de Melo Subject: Re: [RFC 0/3] Revert SRCU from tracepoint infrastructure Message-ID: <20200210134432.GK14897@hirez.programming.kicks-ass.net> References: <20200207205656.61938-1-joel@joelfernandes.org> <1997032737.615438.1581179485507.JavaMail.zimbra@efficios.com> <20200210094616.GC14879@hirez.programming.kicks-ass.net> <20200210133652.GV2935@paulmck-ThinkPad-P72> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200210133652.GV2935@paulmck-ThinkPad-P72> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 10, 2020 at 05:36:52AM -0800, Paul E. McKenney wrote: > > Furthermore, using srcu would be detrimental, because of how it has > > smp_mb() in the read side primitives. > > Note that rcu_irq_enter() and rcu_irq_exit() also contain value-returning > atomics, which imply full memory barriers. There is a whole lot of perf that doesn't go through tracepoints. It makes absolutely no sense to make all that more expensive just because tracepoints are getting 'funny'. > > The best we can do is move that rcu_irq_enter/exit_*() crud into the > > perf tracepoint glue I suppose. > > One approach would be to define a synchronize_preempt_disable() that > waits only for pre-existing disabled-preemption regions (including > of course diabled-irq and NMI-handler regions. Something like Steve > Rostedt's workqueue-baed schedule_on_each_cpu(ftrace_sync) implementation > might work. > > There are of course some plusses and minuses: > > + Works on preempt-disable regions in idle-loop code without > the need to invoke rcu_idle_exit() and rcu_idle_enter().. > > + Straightforward implementation. > > - Does not work on preempt-disable regions on offline CPUs. > (I have no idea if this really matters.) I'd hope not ;-) > - Schedules on idle CPUs, so usage needs to be restricted to > avoid messing up energy-efficient systems. (It should be > just fine to use this for tracing.) Unless you're tracing energy usage -- weird some people actually do that :-)