Re: CPUFREQ-CPUHOTPLUG: Possible circular locking dependency

From: Ingo Molnar
Date: Thu Nov 30 2006 - 09:36:00 EST



* Gautham R Shenoy <ego@xxxxxxxxxx> wrote:

> In process context preemptible code,
> Lets say we are currently running on processor i.
>
> cpu_hotplug_lock() ; /* does mutex_lock(&percpu(hotplug_lock, i)) */
>
> /* do some operation, which might sleep */
> /* migrates to cpu j */
>
> cpu_hotplug_unlock(); /* does mutex_unlock(&percpu(hotplug_lock, i)
> while running on cpu j */
>
> This would cause cacheline ping pong, no?

that would be attached to a very cache-inefficient thing: migrating a
task from one CPU to another. This is not the kind of ping-pong we are
normally worried about. (nor does it happen all that often)

Ingo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/