Re: remove cpu hotplug bustification in cpufreq.

From: Arjan van de Ven
Date: Tue Jul 25 2006 - 15:29:21 EST

On Tue, 2006-07-25 at 20:54 +0200, Ingo Molnar wrote:
> * Linus Torvalds <torvalds@xxxxxxxx> wrote:
> > The current -git tree will complain about some of the more obvious
> > problems. If you see a "Lukewarm IQ" message, it's a sign of somebody
> > re-taking a cpu lock that is already held.
> testing on my latest-rawhide laptop (kernel-2.6.17-1.2445.fc6 and later
> rpms have this change) seems to have pushed the problem over to another
> lock:
> S06cpuspeed/1580 is trying to acquire lock:
> (&policy->lock){--..}, at: [<c06075f9>] mutex_lock+0x21/0x24
> but task is already holding lock:
> (cpu_bitmask_lock){--..}, at: [<c06075f9>] mutex_lock+0x21/0x24
> which lock already depends on the new lock.

so cpufreq_set_policy() takes policy->lock, and then calls into the
userspace governer code
which calls __cpufreq_driver_target... which does lock_cpu_hotplug().

now on the other side:
store_scaling_governor() has the following code:


/* Do not use cpufreq_set_policy here or the user_policy.max
will be wrongly overridden */

so that's the entirely opposite lock order, and a classic AB-BA

Arjan -- who's just cleaned Linus' wall to prepare it for more head

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at