Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1049498ybv; Fri, 7 Feb 2020 13:25:57 -0800 (PST) X-Google-Smtp-Source: APXvYqzbS2G1KjNX3jPswFMSh3A2eonWvBt5uWJqsWSPR9raBqZX2o0uO3nOGW0TeGOunjBc0wGP X-Received: by 2002:a05:6808:358:: with SMTP id j24mr3504151oie.89.1581110757179; Fri, 07 Feb 2020 13:25:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581110757; cv=none; d=google.com; s=arc-20160816; b=TbPCx5r9ybo8/bsTJZx3zGCYsYUbFrurH67YiwSBWZwt0kbpFCNmuiahMSnTJYqy9K LAduk7nwGy/tk/dl/SB7ugRIHLezgUaKYyP1sjwxWQcC3cHsxBUfiJNnJWhrLMFh5yGK dL3cp3cKGTKXiFLjfcwPMSSve4ReNY+uzWmRRKHkEa4H05TC9Y9imp5o7jXpNC1j70LD pblxxPOv/vyuPSc24YV1HcDQNnJBc/LA4ow9UjDyeVbowr/YPLGnCSV7e6r4DT3RRW3q Fslj9MOsb4fVYcOSspbn2LLUitJZ1I4Xjtm7NEUFswjx9S9GTLK7VeLLa7g+9VPy14es Hmlg== 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=5IPzhhTwyhGT2FK0ba0vDZ819pUmouQ1FVHqE6KsldY=; b=ONMSK0edF8NVohuKCdpjNjGB8rzLDZorljwuKSTJbrPAKfpqtwuFDMv/95eODPJ57z +h6bqclJMO1MOQx7aZXVD8r7Tta0KGOY4xtBpHH6KKeTYKtC0UyC4gL2SM+wgG1uhdG1 /+ueHh2jTIriTW9+Ih7Ihf8t2K2xgvpUlh/b/1dDWZ1oyUGZHTItkYj4YnhyJBK8jJru 06Jf8u1jZXTTc8q1qmtMGj5CL1xHi1zQmRsWc6FxhmIlwjxEY06CF1sKZx6Gcgei75mC YH0iJ9MIQiPLoTVP/2TedIYzwNpXrnVw5k4KowkGyldg59nKtXUSAvH1DloyEUuZttUX 4JIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="GyGCTB/B"; 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 a13si339048otq.201.2020.02.07.13.25.44; Fri, 07 Feb 2020 13:25:57 -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="GyGCTB/B"; 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 S1727071AbgBGVYv (ORCPT + 99 others); Fri, 7 Feb 2020 16:24:51 -0500 Received: from mail.kernel.org ([198.145.29.99]:55398 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726947AbgBGVYu (ORCPT ); Fri, 7 Feb 2020 16:24:50 -0500 Received: from paulmck-ThinkPad-P72.home (50-39-105-78.bvtn.or.frontiernet.net [50.39.105.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 7029E222C2; Fri, 7 Feb 2020 21:24:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581110690; bh=Tl95tnh6DZ9qpgq4khmzZST+oYBu9WxXnBeskzydGIQ=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=GyGCTB/BKlsiAnFH+WUtQ9gEDJlA/lFqEGalUSX/M1a+yES4vfuqT/e3oWbaY4kdC 3TC1GS80iWULPSymd4dCceb0IGPMVEsaMBYUkGa2sUJdSH7VMPikpX95Sk1Esp2FDk v4gSF6gccxqvMLH24PTo820uYvg6wu1FTd2V1hZs= Received: by paulmck-ThinkPad-P72.home (Postfix, from userid 1000) id 43F4F35219BF; Fri, 7 Feb 2020 13:24:50 -0800 (PST) Date: Fri, 7 Feb 2020 13:24:50 -0800 From: "Paul E. McKenney" To: "Joel Fernandes (Google)" Cc: linux-kernel@vger.kernel.org, Greg Kroah-Hartman , "Gustavo A. R. Silva" , Ingo Molnar , Richard Fontana , Steven Rostedt , Thomas Gleixner , Josh Triplett , Mathieu Desnoyers , Lai Jiangshan Subject: Re: [RFC 0/3] Revert SRCU from tracepoint infrastructure Message-ID: <20200207212450.GP2935@paulmck-ThinkPad-P72> Reply-To: paulmck@kernel.org References: <20200207205656.61938-1-joel@joelfernandes.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200207205656.61938-1-joel@joelfernandes.org> 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 Fri, Feb 07, 2020 at 03:56:53PM -0500, Joel Fernandes (Google) wrote: > Hi, > These patches remove SRCU usage from tracepoints. The reason for proposing the > reverts is because the whole point of SRCU was to avoid having to call > rcu_irq_enter_irqson(). However this was added back in 865e63b04e9b2 ("tracing: > Add back in rcu_irq_enter/exit_irqson() for rcuidle tracepoints") because perf > was breaking.. > > Further it occurs to me that, by using SRCU for tracepoints, we forgot that RCU > is not really watching the tracepoint callbacks. This means that anyone doing > preempt_disable() in their tracepoint callback, and expecting RCU to listen to > them is in for a big surprise. When RCU is not watching, it does not care about > preempt-disable sections on CPUs as you can see in the forced-quiescent state loop. > > Since SRCU is not providing any benefit because of 865e63b04e9b2 anyway, let us > revert SRCU tracepoint code to maintain the sanity of potential > tracepoint callback registerers. For whatever it is worth, SRCU is the exception to the "RCU needs to be watching" rule. You can have SRCU readers on idle CPUs, offline CPUs, CPUs executing in userspace, whatever. Thanx, Paul > Joel Fernandes (Google) (3): > Revert "tracepoint: Use __idx instead of idx in DO_TRACE macro to make > it unique" > Revert "tracing: Add back in rcu_irq_enter/exit_irqson() for rcuidle > tracepoints" > Revert "tracepoint: Make rcuidle tracepoint callers use SRCU" > > include/linux/tracepoint.h | 40 ++++++-------------------------------- > kernel/tracepoint.c | 10 +--------- > 2 files changed, 7 insertions(+), 43 deletions(-) > > -- > 2.25.0.341.g760bfbb309-goog >