From: Dave Jones <davej@redhat.com>
To: Arjan van de Ven <arjan@linux.intel.com>
Cc: Linus Torvalds <torvalds@osdl.org>, Ingo Molnar <mingo@elte.hu>,
Chuck Ebbert <76306.1226@compuserve.com>,
Ashok Raj <ashok.raj@intel.com>,
linux-kernel <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@osdl.org>
Subject: Re: [patch] Reorganize the cpufreq cpu hotplug locking to not be totally bizare
Date: Wed, 26 Jul 2006 11:51:14 -0400 [thread overview]
Message-ID: <20060726155114.GA28945@redhat.com> (raw)
In-Reply-To: <1153921207.3381.21.camel@laptopd505.fenrus.org>
On Wed, Jul 26, 2006 at 03:40:07PM +0200, Arjan van de Ven wrote:
> Subject: Reorganize the cpufreq cpu hotplug locking to not be totally bizare
> From: Arjan van de Ven <arjan@linux.intel.com>
>
> The patch below moves the cpu hotplugging higher up in the cpufreq
> layering; this is needed to avoid recursive taking of the cpu hotplug
> lock and to otherwise detangle the mess.
>
> The new rules are:
> 1. you must do lock_cpu_hotplug() around the following functions:
> __cpufreq_driver_target
> __cpufreq_governor (for CPUFREQ_GOV_LIMITS operation only)
> __cpufreq_set_policy
> 2. governer methods (.governer) must NOT take the lock_cpu_hotplug()
> lock in any way; they are called with the lock taken already
> 3. if your governer spawns a thread that does things, like calling
> __cpufreq_driver_target, your thread must honor rule #1.
> 4. the policy lock and other cpufreq internal locks nest within
> the lock_cpu_hotplug() lock.
>
> I'm not entirely happy about how the __cpufreq_governor rule ended up
> (conditional locking rule depending on the argument) but basically all
> callers pass this as a constant so it's not too horrible.
>
> The patch also removes the cpufreq_governor() function since during the
> locking audit it turned out to be entirely unused (so no need to fix it)
>
> The patch works on my testbox, but it could use more testing
> (otoh... it can't be much worse than the current code)
>
> Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Looks sensible to me. Assuming it passes testing..
Signed-off-by: Dave Jones <davej@redhat.com>
Linus ?
Dave
--
http://www.codemonkey.org.uk
next prev parent reply other threads:[~2006-07-26 15:52 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-25 0:21 remove cpu hotplug bustification in cpufreq Chuck Ebbert
2006-07-25 0:59 ` Linus Torvalds
2006-07-25 15:06 ` Erik Mouw
2006-07-25 18:54 ` Ingo Molnar
2006-07-25 19:30 ` Arjan van de Ven
2006-07-25 20:57 ` Linus Torvalds
2006-07-26 13:40 ` [patch] Reorganize the cpufreq cpu hotplug locking to not be totally bizare Arjan van de Ven
2006-07-26 15:51 ` Dave Jones [this message]
2006-07-26 17:09 ` Linus Torvalds
2006-07-26 19:42 ` Arjan van de Ven
2006-07-26 20:22 ` Linus Torvalds
2006-07-26 20:58 ` Srivatsa Vaddagiri
2006-07-26 21:29 ` Linus Torvalds
2006-07-26 21:38 ` Arjan van de Ven
2006-07-27 1:40 ` Ingo Molnar
2006-07-27 17:38 ` Ashok Raj
2006-07-29 13:45 ` Ingo Molnar
2006-07-26 21:15 ` Ashok Raj
2006-07-27 19:29 ` Langsdorf, Mark
2006-07-28 13:50 ` Andi Kleen
2006-07-28 17:09 ` Langsdorf, Mark
2006-07-26 20:42 ` Srivatsa Vaddagiri
2006-07-26 21:03 ` Arjan van de Ven
2006-07-26 21:21 ` Srivatsa Vaddagiri
2006-07-26 21:33 ` Rafael J. Wysocki
2006-07-26 21:33 ` Andrew Morton
2006-07-26 22:35 ` Sanjoy Mahajan
2006-07-26 22:44 ` Arjan van de Ven
2006-07-25 20:46 ` remove cpu hotplug bustification in cpufreq Dave Jones
2006-07-25 20:59 ` Linus Torvalds
2006-07-26 17:12 ` Russell King
2006-07-26 17:53 ` Dave Jones
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=20060726155114.GA28945@redhat.com \
--to=davej@redhat.com \
--cc=76306.1226@compuserve.com \
--cc=akpm@osdl.org \
--cc=arjan@linux.intel.com \
--cc=ashok.raj@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=torvalds@osdl.org \
/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