Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp3757388ybv; Mon, 10 Feb 2020 05:58:40 -0800 (PST) X-Google-Smtp-Source: APXvYqzg8g5ZFbxyoKHhlxm7h0ypU3T/Kfs+21HUfRIP+boR7YHL7qpyxExCWG2xWq3BUhYLaEfx X-Received: by 2002:aca:ebc3:: with SMTP id j186mr852142oih.15.1581343118724; Mon, 10 Feb 2020 05:58:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581343118; cv=none; d=google.com; s=arc-20160816; b=FLlqtWAhBhlG5d31ubjQ7lmTYtDyCdsKeHJt6ABkbxd0Dd7Y8PLIYqNvx6FEsOY3FC /eRCeMIuQU7jFjL4O+gAKcmSXznNxfCOhUou4sKTOwAYd+UmBxt3anqkZ4Z/neyAKNwa KlA5ajwnmBx96BEwkjdKY4ap9kPzPh+A3C+rgsdC/sGH3mCRjKpFkT0GZvx5kreryNJt tBE/fF1Up7H1uAe8XJZ+OG72dNOQ2NDHMwiLviGJ2sQpONaZTOGzCtUwcGfeZfW4MwzN usWPa1s7kSBOH00TJvGBcwF04IIR+84SUEwP7gv5GGPY1b4y81QTrl5e1t9ftTDIzUFl yS/A== 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:reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=NOjnypzUZOkhkmSDU4YjJeFmtq0XydtA6rZeh9EKHYw=; b=pek3c0IMuB+O90pGu2cjcD5r+4kL4VrR+EOjkeRbP5GdxOTubAAZS0FzFwVaIBj2Dp z0D7HJ1DO+vgO/9zTg+hSbjDy3/XAocYBD60YuE50mYYqhnd/zjfFr/4MpUj7ipQXekr iJ/XDgmF9lYN3XLKAP26xCeiHUm5YJ3RPk8+lDmP1eKAzPOCuJZDrhXIbcwKl3PFZDym VKiMTCWuukUunQI//cqFyyOjLLb5YAtUqSgvdbWvMCJK64IAM63Ne3QOhAU6YMMkiPSp XSc26oBMGpUh+DqDfVVz9EBACaSMaxQla1qDh0jbj/c3eVCBbe2V2Qf5ExFM51QP+Ewk 5oYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=r2gFg7CT; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x198si151943oif.108.2020.02.10.05.58.26; Mon, 10 Feb 2020 05:58:38 -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=pass header.i=@kernel.org header.s=default header.b=r2gFg7CT; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728610AbgBJN5O (ORCPT + 99 others); Mon, 10 Feb 2020 08:57:14 -0500 Received: from mail.kernel.org ([198.145.29.99]:41122 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727918AbgBJN5N (ORCPT ); Mon, 10 Feb 2020 08:57:13 -0500 Received: from paulmck-ThinkPad-P72.home (unknown [193.85.242.128]) (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 18FF8206ED; Mon, 10 Feb 2020 13:57:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581343033; bh=IWC4nbYsn8wiAFqXOmw689pbM07Zng40OjaVFbq6MzM=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=r2gFg7CTyh1h4iPpRtqdScLeq6c6Zqbv+XwWy5fRSTl3eN5DZM7PEf9yeZ/tY832p 6vfK22OXgdMs6ea2yBziTDrCeDS4vp/4tIFXk7MAntOhDARzVkZ0m+ZF3p1Kgjq0Fw HG6vLtgFcOKuxfn9vRF64BD/6bD5JBu/Tn+FO6Yo= Received: by paulmck-ThinkPad-P72.home (Postfix, from userid 1000) id C19B73522700; Mon, 10 Feb 2020 05:57:10 -0800 (PST) Date: Mon, 10 Feb 2020 05:57:10 -0800 From: "Paul E. McKenney" To: Peter Zijlstra 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: <20200210135710.GX2935@paulmck-ThinkPad-P72> Reply-To: paulmck@kernel.org 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> <20200210134432.GK14897@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200210134432.GK14897@hirez.programming.kicks-ass.net> User-Agent: Mutt/1.9.4 (2018-02-28) 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 02:44:32PM +0100, Peter Zijlstra wrote: > 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'. OK. > > > 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 ;-) Me too, but I have harbored a great many hopes over the decades. ;-) > > - 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 > :-) Would they be changing tracing of their energy usage often in production? Thanx, Paul