Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp525887pxk; Wed, 2 Sep 2020 08:01:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyyInwfyYbuceid54lNTAafg4sNSjiFTvYyNZLIi7IXzMmdTLLMAto+Hm479jnBMeIP6UH1 X-Received: by 2002:a17:907:7206:: with SMTP id dr6mr423211ejc.546.1599058865300; Wed, 02 Sep 2020 08:01:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599058865; cv=none; d=google.com; s=arc-20160816; b=Jybhg1D+GohECNHP+ogNxgCfpq7aNw2SvwGLOFp5wLFjPqj5x7su4mxOR5B5N2Ry22 bUWeq164YPZkbAQi6j6cT02JykMEmGgVd7B9NorO0rBS/BHTJ/0BawoF5X1WExJkiZzO OS2v9Uy7Aw7nafwnL1UOXmfFUq0IG7E92qJyWHlexsTeWIfmiuyNi5gedkWyoTRBjwAO dX+fzcqKZB+veO6Uq2/iANuuk8m/n0zOkpPRWFi54g26rXMqUlczGJRapzXre09EfRTd K3IYn9F/SG7l3RhdwySwFKPtsmeeCZMCbgBnDIMUWuaT6IJthKFBXgnyIljvAy8bmjwP fHGg== 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=OwcDl6o7OMl5a8X5OM+DOYPleHkTp+p/KNbKJddw1YE=; b=ip8kMYTSrbObA/V1j0uhbHE/LsHmsoTV7iCbaUpsd9wk1PtXHhxX7xRmkyOAQh55Ge CcLcOOKKltzQrHLvDiRkpbu2MiwbOPnz6OKVJlj9r6lmQrbWvgZ/96qy9Z7Hsy2hQmy7 icTYMUU7dPCJ2DRcJgJgzxlTd2Z9HmWNCN8GFewHAeMB1DOu5cyhE07p3+udfruymMu7 U3vD4xt1MKcaxx1OcL5GsgAYIeHIC2uVAS8hiXDwHBsyblpffU4/3HY0cjRd31/9RWcf LxU3YeM/io0WetLe6RKxDTKTT0Lq5vDDmo55M4ZrGqWb/k3dsyw/ZYHpHoP6Qd041YcF rEdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=IbeQzyFk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id bh4si2783043ejb.193.2020.09.02.08.00.41; Wed, 02 Sep 2020 08:01:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=IbeQzyFk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1728022AbgIBO7W (ORCPT + 99 others); Wed, 2 Sep 2020 10:59:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:39724 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727037AbgIBNwD (ORCPT ); Wed, 2 Sep 2020 09:52:03 -0400 Received: from paulmck-ThinkPad-P72.home (unknown [50.45.173.55]) (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 2D3F020767; Wed, 2 Sep 2020 13:52:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599054722; bh=s6nqfBIuq3dFoDRkLqgA8cQMjG1yVZ4UtRlISUFc8VE=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=IbeQzyFkL0L1Xx0MynJJM3KNt2ZzKm747XMqTTSZrHK5HGG1gK3K6+OcBg5Zpw390 8UBtwQJ/QuRKdnq6FdcKrsbpA98aFmiAnH7wlT2JxLVtma/p5+Ma9v005KFEEZT76T Q6zZtSxr2fDTjJhybaShUyWoecF+njvfmRhpJL3M= Received: by paulmck-ThinkPad-P72.home (Postfix, from userid 1000) id 0D17F3520DED; Wed, 2 Sep 2020 06:52:02 -0700 (PDT) Date: Wed, 2 Sep 2020 06:52:02 -0700 From: "Paul E. McKenney" To: Ulf Hansson Cc: "Rafael J. Wysocki" , Saravana Kannan , Naresh Kamboju , open list , linux-mmc , lkft-triage@lists.linaro.org, rcu@vger.kernel.org, Linux PM , Anders Roxell , Arnd Bergmann , Rajendra Nayak , John Stultz , Stephen Boyd , Lars Povlsen , madhuparnabhowmik10@gmail.com, Viresh Kumar , Vincent Guittot , peterz@infrdead.org, Lina Iyer Subject: Re: WARNING: suspicious RCU usage - sdhci-pltfm: SDHCI platform and OF driver helper Message-ID: <20200902135202.GG29330@paulmck-ThinkPad-P72> Reply-To: paulmck@kernel.org References: <20200831194402.GD2855@paulmck-ThinkPad-P72> <20200901150047.GB29330@paulmck-ThinkPad-P72> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 Wed, Sep 02, 2020 at 08:49:11AM +0200, Ulf Hansson wrote: > On Tue, 1 Sep 2020 at 17:00, Paul E. McKenney wrote: [ . . . ] > > Here is the list, though it is early in the morning here: > > > > 1. RCU_NONIDLE(). > > > > 2. Peter's patch, if it turns out to hoist your code out of what > > RCU considers to be the idle loop. > > > > 3. If the problem is trace events, use the _rcuidle() variant of the > > trace event. Instead of trace_blah(), use trace_blah_rcuidle(). > > > > 4. Switch from RCU (as in rcu_read_lock()) to SRCU (as in > > srcu_read_lock()). > > > > 5. Take Peter's patch a step further, moving the rcu_idle_enter() > > and rcu_idle_exit() calls as needed. But please keep in mind > > that these two functions require that irqs be disabled by their > > callers. > > > > 6. If RCU_NONIDLE() in inconvenient due to early exits and such, > > you could use the rcu_irq_enter_irqson() and rcu_irq_exit_irqson() > > functions that it calls. > > > > Do any of those help? > > Yes, they will, in one way or the other. Thanks for providing me with > all the available options. > > BTW, I still don't get what good rcu_idle_enter|exit() does, but I am > assuming those need to be called at some point before the CPU goes to > sleep. These functions allow RCU to leave idle CPUs undisturbed. If they were not invoked, RCU would periodically IPI idle CPUs to verify that there were no RCU readers running on them. This would be quite bad for battery lifetime, among other things. So the call to rcu_idle_enter() tells RCU that it may safely completely ignore this CPU until its next call to rcu_idle_exit(). Thanx, Paul