From: Nishanth Aravamudan <nacc@linux.vnet.ibm.com>
To: Michael Ellerman <mpe@ellerman.id.au>
Cc: Li Zhong <zhong@linux.vnet.ibm.com>,
Paul Mackerras <paulus@samba.org>,
Michael Wang <wangyun@linux.vnet.ibm.com>,
linuxppc-dev@lists.ozlabs.org, jstancek@redhat.com
Subject: [PATCH 2/2] powerpc/numa: ensure per-cpu NUMA mappings are correct on topology update
Date: Fri, 17 Oct 2014 17:50:40 -0700 [thread overview]
Message-ID: <20141018005040.GB3969@linux.vnet.ibm.com> (raw)
In-Reply-To: <20141018004944.GA3969@linux.vnet.ibm.com>
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();
}
next prev parent reply other threads:[~2014-10-18 0:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2014-10-21 4:36 ` [2/2] powerpc/numa: ensure per-cpu NUMA mappings are correct on topology update Michael Ellerman
2014-10-28 17:33 ` Nishanth Aravamudan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20141018005040.GB3969@linux.vnet.ibm.com \
--to=nacc@linux.vnet.ibm.com \
--cc=jstancek@redhat.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=paulus@samba.org \
--cc=wangyun@linux.vnet.ibm.com \
--cc=zhong@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).