Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp265087pxk; Wed, 2 Sep 2020 00:05:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyA51CJDr97pzt/vmEZjpV51P9O479kjPP9HAzuCSToyi7hlDNZu+8gg3FhI4BLBNN7UTO9 X-Received: by 2002:a05:6402:a46:: with SMTP id bt6mr5160318edb.269.1599030322221; Wed, 02 Sep 2020 00:05:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599030322; cv=none; d=google.com; s=arc-20160816; b=f+48U8mAQKcXeKdnlNR6AHorukxhCg1KQvkJmibGf3MrkltdMoh+AJuJt4UU7Lhezo uKcjdfikXH0hCwganaFSbG/P9kU2P4SbgoNHJXUzDaxjNv+txWzK6l5tzv0hrvRG0Yx7 q+Kj8B/QkPXytcMeBJxrF8Iym4yWoGumM5F+bGfl9TqATPOZYsRyV34td31r51JKMSNg TEV9wrFwMggKey1Eb9GkgKRdebFQmF2LGj9ClmyUZu5hr2vw6eOGd39iFx57wSezLSi0 F+bvxKQK8dMzdDfeXWt8h2yb3TIHp7MeclU1l2IJ60p5t/ftlcjXIro1fC8gv8lE44dE KX3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=oqyOUgHPVXwuZM1HmllvHicoQC/cT/OXdA6Uv2/+iB4=; b=MGYD06C6WPSW2+Aw19UQoUQr0ghbYeUDYh8gvkVEXbl4XsR5kYfgf7SXnE4XWCAaGQ 3UuciQAYgd/38zfRYi0WK8pzW5KdADlXwfeHEEPt6liViDPSqp4hzw1X8OCP/xCZ1+Iz VpwGLyP5Lrzh/BBmEt9i2xnZ1SqdpZ5EWL2qcCyQDXHXV8LBGybWjPKeo9F4Ep9mD/mz e7oF2oA7elAzGUBARfBYJWzmvcrJzcU7Ctl7dRSzAMNWg5ManiqJ/FzT1d2RF0/sj+tU FyRjkYrIU+hJb1Zyyi8zdOVOaJmWtJ6P8DiP8FrGBdUDS+Y6oTTAcUlkvQaC8NGlmQwC Tlbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eCbwB5ca; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m6si2419084ejl.341.2020.09.02.00.04.59; Wed, 02 Sep 2020 00:05:22 -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=@linaro.org header.s=google header.b=eCbwB5ca; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726770AbgIBHER (ORCPT + 99 others); Wed, 2 Sep 2020 03:04:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56940 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726144AbgIBHEO (ORCPT ); Wed, 2 Sep 2020 03:04:14 -0400 Received: from mail-vk1-xa43.google.com (mail-vk1-xa43.google.com [IPv6:2607:f8b0:4864:20::a43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8C8F0C061244 for ; Wed, 2 Sep 2020 00:04:14 -0700 (PDT) Received: by mail-vk1-xa43.google.com with SMTP id t189so973165vka.10 for ; Wed, 02 Sep 2020 00:04:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=oqyOUgHPVXwuZM1HmllvHicoQC/cT/OXdA6Uv2/+iB4=; b=eCbwB5ca757GasTgZxHRzpZGyB6bd5yVA51xbq1QDoyBOhhSinGhVMYG9jEVunUCWK Ld7ATH27h1nkd5HI5RCeahmEq/NS6t94eb6LQpmx0fIviM8UM6laCTlxPYG/Fzkh9kpN MYYxNaB96nPEXHCaQea8O81073pZE9iqpMELUQn5nYZ+NIYGcHf79ojR8VVdUt8XHP6h QBZNqLC6mTBimGCNM9CFMqqB1gSE0pW94CM4OD2MftHIziqwIYoJnJjynUQSLWSaSA/r wVAQ2CCM/WSy+0ighikTA/BMGQR8XCXUkhiw5YNX0aoV2lK/EVwEJFhTkpOOOR/hbfig xFhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=oqyOUgHPVXwuZM1HmllvHicoQC/cT/OXdA6Uv2/+iB4=; b=EBr9sXUAnb4kmv77IGAYbmPwUYbGawSjgNJ82df2Yakc8Kq9F3P4840jb/L24knVw8 ELSnuN3tWuSSxrtCkdFVm7c4Lo5Wt9AZfAfF+faY6l76ysXAIxuU3Zc9dwTBELyXtrFv oXu7NJKif2KFk7J5RMoSfigpN6p6nf0dXejfDJ5uv2mnDkt5gfCx070lBT6SqCflE5Ru apwrQhfgdRm/mNbN3iqt1lM9T/RlthWbxTVKfcE2IEbhYUnwE/iml3h4uGH8xuEE/c2a 5bFaGaNmceUDj6aHgTz4lqXUdyQ5pn2Gi9BFWrygFgNpoWA1t/Brr4xDVBbbIlppYtGr HCcA== X-Gm-Message-State: AOAM533V5ynLI68LAlahz3OR9VBZRuIRyrvJ5zOpKzqCyy8TlHQk5lrl B71VEcN0BKAjKzJGDoWrPDewsan0mKG/kYnFp7Cftg== X-Received: by 2002:a1f:141:: with SMTP id 62mr4522158vkb.2.1599030253660; Wed, 02 Sep 2020 00:04:13 -0700 (PDT) MIME-Version: 1.0 References: <20200831194402.GD2855@paulmck-ThinkPad-P72> <20200901104206.GU1362448@hirez.programming.kicks-ass.net> <20200901154417.GD20303@codeaurora.org> <20200901155014.GF2674@hirez.programming.kicks-ass.net> <20200901161340.GC29330@paulmck-ThinkPad-P72> <20200901174216.GJ29142@worktop.programming.kicks-ass.net> In-Reply-To: <20200901174216.GJ29142@worktop.programming.kicks-ass.net> From: Ulf Hansson Date: Wed, 2 Sep 2020 09:03:37 +0200 Message-ID: Subject: Re: WARNING: suspicious RCU usage - sdhci-pltfm: SDHCI platform and OF driver helper To: Peter Zijlstra Cc: "Paul E. McKenney" , Lina Iyer , Naresh Kamboju , "Rafael J. Wysocki" , Saravana Kannan , 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 , Thomas Gleixner Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 1 Sep 2020 at 19:42, Peter Zijlstra wrote: > > On Tue, Sep 01, 2020 at 09:13:40AM -0700, Paul E. McKenney wrote: > > On Tue, Sep 01, 2020 at 05:50:14PM +0200, peterz@infradead.org wrote: > > > On Tue, Sep 01, 2020 at 09:44:17AM -0600, Lina Iyer wrote: > > > > > > > > > I could add RCU_NONIDLE for the calls to pm_runtime_put_sync_suspend() > > > > > > > > > and pm_runtime_get_sync() in psci_enter_domain_idle_state(). Perhaps > > > > > > > > > that's the easiest approach, at least to start with. > > > > > > > I think this would be nice. This should also cover the case, where PM domain > > > > power off notification callbacks call trace function internally. Right? > > > > > > That's just more crap for me to clean up later :-( > > > > > > trace_*_rcuidle() and RCU_NONIDLE() need to die, not proliferate. > > > > Moving the idle-entry boundary further in is good in any number of ways. > > But experience indicates that no matter how far you move it, there will > > be something complex further in. Unless you are pushing it all the way > > into all the arch-specific code down as far as it can possibly go? > > Not all; the simple cpuidle drivers should be good already. The more > complicated ones need some help. > > The patch provided earlier: > > https://lkml.kernel.org/r/20200901104206.GU1362448@hirez.programming.kicks-ass.net > > should allow the complicated drivers to take over and DTRT. Don't get me wrong, I fully support your approach by moving the rcu_idle_enter() down as far as possible, but it seems to require more work than just adding a simple flag for the idle states. Lots of cpuidle drivers are using CPU_PM notifiers (grep for cpu_pm_enter and you will see) from their idlestates ->enter() callbacks. And for those we are already calling rcu_irq_enter_irqson|off() in cpu_pm_notify() when firing them. Kind regards Uffe