Re: [PATCH] cpusets: rework guarantee_online_cpus() to fix deadlock with cpu_down()

Lai Jiangshan
2009-08-02T02:17:50Z

Oleg Nesterov wrote:

>
> - do NOT scan cs->parent cpusets. If there are no online CPUs in
> cs->cpus_allowed, we use cpu_online_mask. This is only possible
> when we are called by cpu_down() hooks, in that case
> cpuset_track_online_cpus(CPU_DEAD) will fix things later.
>

We must scan cs->parent cpusets.
A task is constrained by a cpuset, it must be constrained
this cpuset's parent too.

cpuset_lock() is not awful at all.

Lai.