From: Frederic Weisbecker <fweisbec@gmail.com>
To: Jonathan Corbet <corbet@lwn.net>, Ingo Molnar <mingo@elte.hu>
Cc: LKML <linux-kernel@vger.kernel.org>, Mark Gross <mgross@linux.intel.com>
Subject: Re: [PATCH 1/2] pm_qos: remove BKL
Date: Sat, 8 Aug 2009 02:31:33 +0200 [thread overview]
Message-ID: <20090808003130.GJ4999@nowhere> (raw)
In-Reply-To: <20090807090818.064d3647@bike.lwn.net>
On Fri, Aug 07, 2009 at 09:08:18AM -0600, Jonathan Corbet wrote:
> On Fri, 7 Aug 2009 07:54:13 +0200
> Frederic Weisbecker <fweisbec@gmail.com> wrote:
>
> > May be the last doubt could be the blocking_notifier_call_chain() call from
> > update_target(). Not sure if these notifier handlers can expect to be called
> > concurrently?
>
> I will confess that I hadn't audited the notifiers. One could easily
> argue that concurrent calls to update_target() are entirely possible
> with the current code (only one of the callers had BKL protection),
> but, then, I'm supposed to be trying to make things better.
>
> The notifier call chain is already protected against concurrent
> modification, but, since an rwsem is used, concurrent calls to the
> notifiers themselves are possible. A quick grep shows that, in 2.6.31-rc5,
> there is exactly one notifier registered. It's in
> drivers/cpuidle/cpuidle.c; here's the whole thing:
>
> static void smp_callback(void *v)
> {
> /* we already woke the CPU up, nothing more to do */
> }
>
> After deep meditation on possible race condition scenarios, I am force to
> conclude that this particular notifier already has all of the protection it
> needs, and that any extra locking is likely to be superfluous.
Hehe :-)
So it would be nice to apply these patches.
Ingo?
> Thanks for looking at the patch,
>
> jon
next prev parent reply other threads:[~2009-08-08 0:31 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-06 19:58 [PATCH 0/2] pm_qos: BKL removal and cleanup Jonathan Corbet
2009-08-06 19:59 ` [PATCH 1/2] pm_qos: remove BKL Jonathan Corbet
2009-08-07 2:03 ` Frederic Weisbecker
2009-08-07 5:54 ` Frederic Weisbecker
2009-08-07 15:08 ` Jonathan Corbet
2009-08-08 0:31 ` Frederic Weisbecker [this message]
2009-08-06 20:01 ` [PATCH 2/2] pm_qos: clean up racy "name" variable Jonathan Corbet
2009-08-07 2:05 ` Jonathan Corbet
2009-08-07 6:03 ` Frederic Weisbecker
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=20090808003130.GJ4999@nowhere \
--to=fweisbec@gmail.com \
--cc=corbet@lwn.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mgross@linux.intel.com \
--cc=mingo@elte.hu \
/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