From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CA632C433E2 for ; Wed, 2 Sep 2020 07:04:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A963520826 for ; Wed, 2 Sep 2020 07:04:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="eCbwB5ca" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726800AbgIBHES (ORCPT ); Wed, 2 Sep 2020 03:04:18 -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-Google-Smtp-Source: ABdhPJzfSNs6jZeqCuXz5Y44M9LkgRNqp3/czj2HsyCcMxrEGmrTRQgLe8Z9ajKvWLgQg8HUNGhfuUCll6CTEjSaT1o= 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