On Thu, Nov 06, 2014 at 09:46:34AM +0800, Wanpeng Li wrote:
So this is all quite horrible code, but what I think happens is that:Ah, it could be that for offline cpus we have a singleton rd. Lemme tryI still cannot find where build the singleton rd in the codes, could you
point out?
sched_cpu_inactive() -> set_cpu_active(cpu, false);
cpuset_cpu_inactive() -> cpuset_update_active_cpus(false)
-> partition_sched_domains(1, NULL, NULL)
-> build_sched_domains(cpu_active_mask)
-> for_each_cpu()
cpu_attach_domain() -> rq_attach_root()
Now, that will detach all active cpus from the current root domain and
attach them to the new root domain. Which leaves behind the old root
domain attached to only the one 'dead' cpu.