Re: [PATCH 1/4] cgroup: change locking order inattach_task_by_pid()

From: Oleg Nesterov
Date: Sun Sep 18 2011 - 15:00:36 EST


On 09/05, Tejun Heo wrote:
>
> cgroup_mutex is updated to nest inside threadgroup_fork_lock instead
> of the other way around. threadgroup locking is scheduled to be
> updated to cover all threadgroup altering operations and nesting it
> inside cgroup_mutex complicates locking dependency unnecessarily.

Could you please explain this change?

I can't understand why threadgroup_lock() under cgroup_mutex is bad.
Do you mean we can deadlock otherwise?

And, this means we can't change cpuset_do_move_task() to do
threadgroup_lock().

Oleg.

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