public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: Madhuparna Bhowmik <madhuparnabhowmik10@gmail.com>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Madhuparna Bhowmik <madhuparnabhowmik10@gmail.com>,
	Joel Fernandes <joel@joelfernandes.org>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Pavel Machek <pavel@ucw.cz>, Len Brown <len.brown@intel.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Linux PM <linux-pm@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Amol Grover <frextrite@gmail.com>,
	linux-kernel-mentees@lists.linuxfoundation.org,
	"Paul E. McKenney" <paulmck@kernel.org>
Subject: Re: [PATCH 1/2] drivers: base: power: main: Use built-in RCU list checking
Date: Tue, 3 Mar 2020 21:39:06 +0530	[thread overview]
Message-ID: <20200303160810.GA5486@madhuparna-HP-Notebook> (raw)
In-Reply-To: <CAJZ5v0hee4FxeVub_ZkAYn9z8q1_ZLA_AcmTtS-w39VzSe0UxA@mail.gmail.com>

On Mon, Mar 02, 2020 at 06:02:21PM +0100, Rafael J. Wysocki wrote:
> On Mon, Mar 2, 2020 at 1:34 PM Madhuparna Bhowmik
> <madhuparnabhowmik10@gmail.com> wrote:
> >
> >
> >
> > On Mon, 2 Mar, 2020, 3:48 AM Joel Fernandes, <joel@joelfernandes.org> wrote:
> >>
> >> On Sun, Mar 1, 2020 at 4:23 PM Rafael J. Wysocki <rafael@kernel.org> wrote:
> >> >
> >> > On Sun, Mar 1, 2020 at 9:53 PM <joel@joelfernandes.org> wrote:
> >> > >
> >> > >
> >> > >
> >> > > On March 1, 2020 3:12:53 PM EST, "Rafael J. Wysocki" <rafael@kernel.org> wrote:
> >> > > >On Fri, Feb 28, 2020 at 6:47 PM <madhuparnabhowmik10@gmail.com> wrote:
> >> > > >>
> >> > > >> From: Madhuparna Bhowmik <madhuparnabhowmik10@gmail.com>
> >> > > >>
> >> > > >> This patch passes the cond argument to list_for_each_entry_rcu()
> >> > > >> to fix the following false-positive lockdep warnings:
> >> > > >>
> >> > > >> [  330.302784] =============================
> >> > > >> [  330.302789] WARNING: suspicious RCU usage
> >> > > >> [  330.302796] 5.6.0-rc1+ #5 Not tainted
> >> > > >> [  330.302801] -----------------------------
> >> > > >> [  330.302808] drivers/base/power/main.c:326 RCU-list traversed in
> >> > > >non-reader section!!
> >> > > >>
> >> > > >> [  330.303303] =============================
> >> > > >> [  330.303307] WARNING: suspicious RCU usage
> >> > > >> [  330.303311] 5.6.0-rc1+ #5 Not tainted
> >> > > >> [  330.303315] -----------------------------
> >> > > >> [  330.303319] drivers/base/power/main.c:1698 RCU-list traversed in
> >> > > >non-reader section!!
> >> > > >>
> >> > > >> [  331.934969] =============================
> >> > > >> [  331.934971] WARNING: suspicious RCU usage
> >> > > >> [  331.934973] 5.6.0-rc1+ #5 Not tainted
> >> > > >> [  331.934975] -----------------------------
> >> > > >> [  331.934977] drivers/base/power/main.c:1238 RCU-list traversed in
> >> > > >non-reader section!!
> >> > > >>
> >> > > >> [  332.467772] WARNING: suspicious RCU usage
> >> > > >> [  332.467775] 5.6.0-rc1+ #5 Not tainted
> >> > > >> [  332.467775] -----------------------------
> >> > > >> [  332.467778] drivers/base/power/main.c:269 RCU-list traversed in
> >> > > >non-reader section!!
> >> > > >
> >> > > >I don't see these warnings in the kernels run locally here.
> >> > > >
> >> > > >What do you do to get them?
> >> > > >
> >> > > >Joel, any comments here?
> >> > >
> >> > > You have to enable lockdep in your config. Does your setup have that?
> >> >
> >> > CONFIG_LOCK_DEBUGGING_SUPPORT=y
> >> > CONFIG_PROVE_LOCKING=y
> >> > CONFIG_DEBUG_SPINLOCK=y
> >> > CONFIG_DEBUG_LOCK_ALLOC=y
> >> > CONFIG_LOCKDEP=y
> >>
> >>
> > I had CONFIG_PROVE_RCU_LIST = y and I think these warnings were triggered when I had closed my laptop (like just close without shutting down).
> 
> OK, so let's define a macro for that in this file to avoid code duplication.
> 
> And analogously in the second patch.
>
Sure, I will do it and send the patch soon.

> Thanks!

      reply	other threads:[~2020-03-03 16:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-28 17:46 [PATCH 1/2] drivers: base: power: main: Use built-in RCU list checking madhuparnabhowmik10
2020-03-01 20:12 ` Rafael J. Wysocki
2020-03-01 20:53   ` joel
2020-03-01 21:23     ` Rafael J. Wysocki
2020-03-01 22:18       ` Joel Fernandes
     [not found]         ` <CAD=jOEZ3vdNC4qTMxptaXLjs7i8TCTYjeiv9vXhcapLSkrr9RQ@mail.gmail.com>
2020-03-02 17:02           ` Rafael J. Wysocki
2020-03-03 16:09             ` Madhuparna Bhowmik [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200303160810.GA5486@madhuparna-HP-Notebook \
    --to=madhuparnabhowmik10@gmail.com \
    --cc=frextrite@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=joel@joelfernandes.org \
    --cc=len.brown@intel.com \
    --cc=linux-kernel-mentees@lists.linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=paulmck@kernel.org \
    --cc=pavel@ucw.cz \
    --cc=rafael@kernel.org \
    --cc=rjw@rjwysocki.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox