Re: [PATCH 1/6] kill the broken and deadlockable cpuset_lock/cpuset_cpus_allowed_lockedcode

From: Miao Xie
Date: Wed Mar 24 2010 - 23:00:52 EST


on 2010-3-15 17:10, Oleg Nesterov wrote:
> This patch just states the fact the cpusets/cpuhotplug interaction is
> broken and removes the deadlockable code which only pretends to work.
>
> - cpuset_lock() doesn't really work. It is needed for
> cpuset_cpus_allowed_locked() but we can't take this lock in
> try_to_wake_up()->select_fallback_rq() path.
>
> - cpuset_lock() is deadlockable. Suppose that a task T bound to CPU takes
> callback_mutex. If cpu_down(CPU) happens before T drops callback_mutex
> stop_machine() preempts T, then migration_call(CPU_DEAD) tries to take
> cpuset_lock() and hangs forever because CPU is already dead and thus
> T can't be scheduled.

The problem what you said don't exist, because the kernel already move T to
the active cpu when preparing to turn off a CPU.

Thanks!
Miao

--
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/