Re: CPUFREQ-CPUHOTPLUG: Possible circular locking dependency

Ingo Molnar
2006-11-30T14:35:37Z

* Gautham R Shenoy <ego@in.ibm.com> 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