With commit 2fabf084b6ad ("powerpc: reorder per-cpu NUMA information's
initialization"), during boottime, cpu_numa_callback() is called
earlier(before their online) for each cpu, and verify_cpu_node_mapping()
uses cpu_to_node() to check whether siblings are in the same node.
It skips the checking for siblings that are not online yet. So the only
check done here is for the bootcpu, which is online at that time. But
the per-cpu numa_node cpu_to_node() uses hasn't been set up yet (which
will be set up in smp_prepare_cpus()).
So I saw something like following reported:
[ 0.000000] CPU thread siblings 1/2/3 and 0 don't belong to the same
node!
As we don't actually do the checking during this early stage, so maybe
we could directly call numa_setup_cpu() in do_init_bootmem().
Cc: Nishanth Aravamudan <redacted>
Cc: Nathan Fontenot <redacted>
Signed-off-by: Li Zhong <redacted>
---
arch/powerpc/mm/numa.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
As Nish suggested, it makes more sense to init the numa node informatiion
for present cpus at boottime, which could also avoid WARN_ON(1) in
numa_setup_cpu().
With this change, we also need to change the smp_prepare_cpus() to set up
numa information only on present cpus.
For those possible, but not present cpus, their numa information
will be set up after they are started, as the original code did before commit
2fabf084b6ad.
Cc: Nishanth Aravamudan <redacted>
Cc: Nathan Fontenot <redacted>
Signed-off-by: Li Zhong <redacted>
---
arch/powerpc/kernel/smp.c | 10 ++++++++--
arch/powerpc/mm/numa.c | 2 +-
2 files changed, 9 insertions(+), 3 deletions(-)
this patches changes some error handling logics in numa_setup_cpu(),
when cpu node is not found, so:
if the cpu is possible, but not present, -1 is kept in numa_cpu_lookup_table,
so later, if the cpu is added, we could set correct numa information for it.
if the cpu is present, then we set the first online node to
numa_cpu_lookup_table instead of 0 ( in case 0 might not be an online node? )
Cc: Nishanth Aravamudan <redacted>
Cc: Nathan Fontenot <redacted>
Signed-off-by: Li Zhong <redacted>
---
arch/powerpc/mm/numa.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
@@ -538,7 +538,7 @@ static int of_drconf_to_nid_single(struct of_drconf_cell *drmem,*/staticintnuma_setup_cpu(unsignedlonglcpu){-intnid;+intnid=-1;structdevice_node*cpu;/*
@@ -555,19 +555,21 @@ static int numa_setup_cpu(unsigned long lcpu)if(!cpu){WARN_ON(1);-nid=0;-gotoout;+if(cpu_present(lcpu))+gotoout_present;+else+gotoout;}nid=of_node_to_nid_single(cpu);+out_present:if(nid<0||!node_online(nid))nid=first_online_node;-out:-map_cpu_to_node(lcpu,nid);+map_cpu_to_node(lcpu,nid);of_node_put(cpu);-+out:returnnid;}
With commit 2fabf084b6ad ("powerpc: reorder per-cpu NUMA information's
initialization"), during boottime, cpu_numa_callback() is called
earlier(before their online) for each cpu, and verify_cpu_node_mapping()
uses cpu_to_node() to check whether siblings are in the same node.
It skips the checking for siblings that are not online yet. So the only
check done here is for the bootcpu, which is online at that time. But
the per-cpu numa_node cpu_to_node() uses hasn't been set up yet (which
will be set up in smp_prepare_cpus()).
So I saw something like following reported:
[ 0.000000] CPU thread siblings 1/2/3 and 0 don't belong to the same
node!
As we don't actually do the checking during this early stage, so maybe
we could directly call numa_setup_cpu() in do_init_bootmem().
Cc: Nishanth Aravamudan <redacted>
Cc: Nathan Fontenot <redacted>
Signed-off-by: Li Zhong <redacted>
As Nish suggested, it makes more sense to init the numa node informatiion
for present cpus at boottime, which could also avoid WARN_ON(1) in
numa_setup_cpu().
With this change, we also need to change the smp_prepare_cpus() to set up
numa information only on present cpus.
For those possible, but not present cpus, their numa information
will be set up after they are started, as the original code did before commit
2fabf084b6ad.
Cc: Nishanth Aravamudan <redacted>
Cc: Nathan Fontenot <redacted>
Signed-off-by: Li Zhong <redacted>
this patches changes some error handling logics in numa_setup_cpu(),
when cpu node is not found, so:
if the cpu is possible, but not present, -1 is kept in numa_cpu_lookup_table,
so later, if the cpu is added, we could set correct numa information for it.
if the cpu is present, then we set the first online node to
numa_cpu_lookup_table instead of 0 ( in case 0 might not be an online node? )
Not currently possible (Node 0 is always online), but I'm working on
changing that :)
@@ -538,7 +538,7 @@ static int of_drconf_to_nid_single(struct of_drconf_cell *drmem,*/staticintnuma_setup_cpu(unsignedlonglcpu){-intnid;+intnid=-1;structdevice_node*cpu;/*
@@ -555,19 +555,21 @@ static int numa_setup_cpu(unsigned long lcpu)if(!cpu){WARN_ON(1);-nid=0;-gotoout;+if(cpu_present(lcpu))+gotoout_present;+else+gotoout;}nid=of_node_to_nid_single(cpu);+out_present:if(nid<0||!node_online(nid))nid=first_online_node;-out:-map_cpu_to_node(lcpu,nid);+map_cpu_to_node(lcpu,nid);of_node_put(cpu);-+out:returnnid;}
As Nish suggested, it makes more sense to init the numa node informatiion
for present cpus at boottime, which could also avoid WARN_ON(1) in
numa_setup_cpu().
Hit this on a Power8 LPAR. With the patchset applied the warnings no
longer present.
quoted
With this change, we also need to change the smp_prepare_cpus() to set up
numa information only on present cpus.
For those possible, but not present cpus, their numa information
will be set up after they are started, as the original code did before commit
2fabf084b6ad.
Cc: Nishanth Aravamudan <redacted>
Cc: Nathan Fontenot <redacted>
Signed-off-by: Li Zhong <redacted>
Ben & Michael,
What's the status of these patches?
Thanks,
Nish
On 27.08.2014 [17:33:59 +0800], Li Zhong wrote:
quoted hunk
With commit 2fabf084b6ad ("powerpc: reorder per-cpu NUMA information's
initialization"), during boottime, cpu_numa_callback() is called
earlier(before their online) for each cpu, and verify_cpu_node_mapping()
uses cpu_to_node() to check whether siblings are in the same node.
It skips the checking for siblings that are not online yet. So the only
check done here is for the bootcpu, which is online at that time. But
the per-cpu numa_node cpu_to_node() uses hasn't been set up yet (which
will be set up in smp_prepare_cpus()).
So I saw something like following reported:
[ 0.000000] CPU thread siblings 1/2/3 and 0 don't belong to the same
node!
As we don't actually do the checking during this early stage, so maybe
we could directly call numa_setup_cpu() in do_init_bootmem().
Cc: Nishanth Aravamudan <redacted>
Cc: Nathan Fontenot <redacted>
Signed-off-by: Li Zhong <redacted>
---
arch/powerpc/mm/numa.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
From: Benjamin Herrenschmidt <benh@kernel.crashing.org> Date: 2014-10-02 21:28:34
On Thu, 2014-10-02 at 14:13 -0700, Nishanth Aravamudan wrote:
Ben & Michael,
What's the status of these patches?
Waiting for somebody to review them ? :-)
Cheers,
Ben.
Thanks,
Nish
On 27.08.2014 [17:33:59 +0800], Li Zhong wrote:
quoted
With commit 2fabf084b6ad ("powerpc: reorder per-cpu NUMA information's
initialization"), during boottime, cpu_numa_callback() is called
earlier(before their online) for each cpu, and verify_cpu_node_mapping()
uses cpu_to_node() to check whether siblings are in the same node.
It skips the checking for siblings that are not online yet. So the only
check done here is for the bootcpu, which is online at that time. But
the per-cpu numa_node cpu_to_node() uses hasn't been set up yet (which
will be set up in smp_prepare_cpus()).
So I saw something like following reported:
[ 0.000000] CPU thread siblings 1/2/3 and 0 don't belong to the same
node!
As we don't actually do the checking during this early stage, so maybe
we could directly call numa_setup_cpu() in do_init_bootmem().
Cc: Nishanth Aravamudan <redacted>
Cc: Nathan Fontenot <redacted>
Signed-off-by: Li Zhong <redacted>
---
arch/powerpc/mm/numa.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
Ah ok, thanks -- I wasn't following your tree, my fault. Do we want
these to go back to 3.17-stable, as they fix some annoying splats during
boot (non-fatal afaict, though)?
-Nish
Ah ok, thanks -- I wasn't following your tree, my fault.
Not really your fault, I hadn't announced my trees existence :)
Do we want these to go back to 3.17-stable, as they fix some annoying splats
during boot (non-fatal afaict, though)?
Up to you really, I don't know how often/bad they were. I haven't added CC
stable tags to the commits, so if you want them in stable you should send them
explicitly.
cheers
Ah ok, thanks -- I wasn't following your tree, my fault.
Not really your fault, I hadn't announced my trees existence :)
quoted
Do we want these to go back to 3.17-stable, as they fix some annoying splats
during boot (non-fatal afaict, though)?
Up to you really, I don't know how often/bad they were. I haven't added CC
stable tags to the commits, so if you want them in stable you should send them
explicitly.
I think they occur every boot, unconditionally, on pseries. Doesn't
prevent boot, just really noisy. I think it'd be good to get them into
-stable.
Li Zhong, can you push them once they get sent upstream?
Thanks,
Nish
Ah ok, thanks -- I wasn't following your tree, my fault.
Not really your fault, I hadn't announced my trees existence :)
quoted
Do we want these to go back to 3.17-stable, as they fix some annoying splats
during boot (non-fatal afaict, though)?
Up to you really, I don't know how often/bad they were. I haven't added CC
stable tags to the commits, so if you want them in stable you should send them
explicitly.
I think they occur every boot, unconditionally, on pseries. Doesn't
prevent boot, just really noisy. I think it'd be good to get them into
-stable.
Li Zhong, can you push them once they get sent upstream?
Ok, I will send these patches to stable mailing list after it is merged.
Thanks, Zhong
Ah ok, thanks -- I wasn't following your tree, my fault.
Not really your fault, I hadn't announced my trees existence :)
quoted
Do we want these to go back to 3.17-stable, as they fix some annoying splats
during boot (non-fatal afaict, though)?
Up to you really, I don't know how often/bad they were. I haven't added CC
stable tags to the commits, so if you want them in stable you should send them
explicitly.
I think they occur every boot, unconditionally, on pseries. Doesn't
prevent boot, just really noisy. I think it'd be good to get them into
-stable.
Li Zhong, can you push them once they get sent upstream?
I guess I only need to send the first two patches to stable?
Thanks, Zhong
Ah ok, thanks -- I wasn't following your tree, my fault.
Not really your fault, I hadn't announced my trees existence :)
quoted
Do we want these to go back to 3.17-stable, as they fix some annoying splats
during boot (non-fatal afaict, though)?
Up to you really, I don't know how often/bad they were. I haven't added CC
stable tags to the commits, so if you want them in stable you should send them
explicitly.
I think they occur every boot, unconditionally, on pseries. Doesn't
prevent boot, just really noisy. I think it'd be good to get them into
-stable.
Li Zhong, can you push them once they get sent upstream?
I guess I only need to send the first two patches to stable?
Probably. It's not clear from the changelog how serious a problem it fixes.
See Documentation/stable_kernel_rules.txt
cheers
Ah ok, thanks -- I wasn't following your tree, my fault.
Not really your fault, I hadn't announced my trees existence :)
quoted
Do we want these to go back to 3.17-stable, as they fix some annoying splats
during boot (non-fatal afaict, though)?
Up to you really, I don't know how often/bad they were. I haven't added CC
stable tags to the commits, so if you want them in stable you should send them
explicitly.
I think they occur every boot, unconditionally, on pseries. Doesn't
prevent boot, just really noisy. I think it'd be good to get them into
-stable.
Li Zhong, can you push them once they get sent upstream?
I guess I only need to send the first two patches to stable?
Probably. It's not clear from the changelog how serious a problem it fixes.
See Documentation/stable_kernel_rules.txt
OK, I'll send the first two to stable.
Thanks, Zhong