* [PATCH 1/2] powerpc/numa: use cached value of update->cpu in update_cpu_topology
@ 2014-10-18 0:49 Nishanth Aravamudan
2014-10-18 0:50 ` [PATCH 2/2] powerpc/numa: ensure per-cpu NUMA mappings are correct on topology update Nishanth Aravamudan
0 siblings, 1 reply; 4+ messages in thread
From: Nishanth Aravamudan @ 2014-10-18 0:49 UTC (permalink / raw)
To: Michael Ellerman
Cc: Li Zhong, Paul Mackerras, Michael Wang, linuxppc-dev, jstancek
There isn't any need to keep referring to update->cpu, as we've already
checked cpu == update->cpu at this point.
Signed-off-by: Nishanth Aravamudan <nacc@linux.vnet.ibm.com>
diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
index 649666d5d1c2..86fdb004ad2f 100644
--- a/arch/powerpc/mm/numa.c
+++ b/arch/powerpc/mm/numa.c
@@ -1491,8 +1491,8 @@ static int update_cpu_topology(void *data)
if (cpu != update->cpu)
continue;
- unmap_cpu_from_node(update->cpu);
- map_cpu_to_node(update->cpu, update->new_nid);
+ unmap_cpu_from_node(cpu);
+ map_cpu_to_node(cpu, update->new_nid);
vdso_getcpu_init();
}
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] powerpc/numa: ensure per-cpu NUMA mappings are correct on topology update
2014-10-18 0:49 [PATCH 1/2] powerpc/numa: use cached value of update->cpu in update_cpu_topology Nishanth Aravamudan
@ 2014-10-18 0:50 ` Nishanth Aravamudan
2014-10-21 4:36 ` [2/2] " Michael Ellerman
0 siblings, 1 reply; 4+ messages in thread
From: Nishanth Aravamudan @ 2014-10-18 0:50 UTC (permalink / raw)
To: Michael Ellerman
Cc: Li Zhong, Paul Mackerras, Michael Wang, linuxppc-dev, jstancek
We received a report of warning in kernel/sched/core.c where the sched
group was NULL on an LPAR after a topology update. This seems to occur
because after the topology update has moved the CPUs, cpu_to_node is
returning the old value still, which ends up breaking the consistency of
the NUMA topology in the per-cpu maps. Ensure that we update the per-cpu
fields when we re-map CPUs.
Signed-off-by: Nishanth Aravamudan <nacc@linux.vnet.ibm.com>
diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
index 86fdb004ad2f..048be62dc979 100644
--- a/arch/powerpc/mm/numa.c
+++ b/arch/powerpc/mm/numa.c
@@ -1488,11 +1488,14 @@ static int update_cpu_topology(void *data)
cpu = smp_processor_id();
for (update = data; update; update = update->next) {
+ int new_nid = update->new_nid;
if (cpu != update->cpu)
continue;
unmap_cpu_from_node(cpu);
- map_cpu_to_node(cpu, update->new_nid);
+ map_cpu_to_node(cpu, new_nid);
+ set_cpu_numa_node(cpu, new_nid);
+ set_cpu_numa_mem(cpu, local_memory_node(new_nid));
vdso_getcpu_init();
}
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [2/2] powerpc/numa: ensure per-cpu NUMA mappings are correct on topology update
2014-10-18 0:50 ` [PATCH 2/2] powerpc/numa: ensure per-cpu NUMA mappings are correct on topology update Nishanth Aravamudan
@ 2014-10-21 4:36 ` Michael Ellerman
2014-10-28 17:33 ` Nishanth Aravamudan
0 siblings, 1 reply; 4+ messages in thread
From: Michael Ellerman @ 2014-10-21 4:36 UTC (permalink / raw)
To: Nishanth Aravamudan
Cc: linuxppc-dev, Paul Mackerras, Michael Wang, Li Zhong, jstancek
On Sat, 2014-18-10 at 00:50:40 UTC, Nishanth Aravamudan wrote:
> We received a report of warning in kernel/sched/core.c where the sched
> group was NULL on an LPAR after a topology update. This seems to occur
> because after the topology update has moved the CPUs, cpu_to_node is
> returning the old value still, which ends up breaking the consistency of
> the NUMA topology in the per-cpu maps. Ensure that we update the per-cpu
> fields when we re-map CPUs.
This looks like a bug fix, I assume you want it to go in for 3.18 ?
cheers
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [2/2] powerpc/numa: ensure per-cpu NUMA mappings are correct on topology update
2014-10-21 4:36 ` [2/2] " Michael Ellerman
@ 2014-10-28 17:33 ` Nishanth Aravamudan
0 siblings, 0 replies; 4+ messages in thread
From: Nishanth Aravamudan @ 2014-10-28 17:33 UTC (permalink / raw)
To: Michael Ellerman
Cc: linuxppc-dev, Paul Mackerras, Michael Wang, Li Zhong, jstancek
Hi Michael,
On 21.10.2014 [15:36:27 +1100], Michael Ellerman wrote:
> On Sat, 2014-18-10 at 00:50:40 UTC, Nishanth Aravamudan wrote:
> > We received a report of warning in kernel/sched/core.c where the sched
> > group was NULL on an LPAR after a topology update. This seems to occur
> > because after the topology update has moved the CPUs, cpu_to_node is
> > returning the old value still, which ends up breaking the consistency of
> > the NUMA topology in the per-cpu maps. Ensure that we update the per-cpu
> > fields when we re-map CPUs.
>
> This looks like a bug fix, I assume you want it to go in for 3.18 ?
Yes, please!
Thanks,
Nish
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-10-28 18:02 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-18 0:49 [PATCH 1/2] powerpc/numa: use cached value of update->cpu in update_cpu_topology Nishanth Aravamudan
2014-10-18 0:50 ` [PATCH 2/2] powerpc/numa: ensure per-cpu NUMA mappings are correct on topology update Nishanth Aravamudan
2014-10-21 4:36 ` [2/2] " Michael Ellerman
2014-10-28 17:33 ` Nishanth Aravamudan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).