[PATCH] x86-64, NUMA: fix fakenuma boot failure

From: KOSAKI Motohiro
Date: Wed Apr 13 2011 - 03:02:53 EST


> Hello, KOSAKI.
>
> On Tue, Apr 12, 2011 at 03:31:42PM +0900, KOSAKI Motohiro wrote:
> > Unfortunately, don't work.
> > full dmesg is below.
> ...
> > [ 0.220979] ERROR: groups don't span domain->span
> > [ 0.222122] divide error: 0000 [#1] SMP
> > [ 0.222975] last sysfs file:
> > [ 0.222975] CPU 0
> > [ 0.222975] Modules linked in:
> > [ 0.222975]
> > [ 0.222975] Pid: 1, comm: swapper Not tainted 2.6.39-rc1+ #2 FUJITSU-SV
>
> Hmmm... looks like the added condition didn't trigger at all. I'm
> travelling until the end of the next week and can only test using qemu
> which I don't think supports sibling topology. Can you please add
> some printks in the sibling link function and find out why the
> condition isn't triggering? Thank you.

Your patch have two mistake.

1) link_thread_siblings() is for HT
set_cpu_sibling_map() has another sibling calculations.
2) numa_set_node() is not enough. scheduler is using node_to_cpumask_map[] too.

If we need to take your approach, correct patch is below.


btw, Please see cpu_coregroup_mask(). its return value depend on
sched_mc_power_savings and sched_smt_power_savings. then, we need to care
both cpu_core_mask and cpu_llc_shared_mask. I think.

====================================