linux-numa.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] numa_emulation fix
@ 2012-03-16 19:28 Andrea Arcangeli
  2012-03-16 19:28 ` [PATCH] numa_emulation: fix cpumask_of_node() Andrea Arcangeli
  0 siblings, 1 reply; 2+ messages in thread
From: Andrea Arcangeli @ 2012-03-16 19:28 UTC (permalink / raw)
  To: linux-mm, linux-numa; +Cc: Andi Kleen, Johannes Weiner, Andrew Morton

Hi,

basically without this various debug checks in AutoNUMA triggers and
the kernel crashes because a CPU can't belong to more than one node,
can it?

I've been using this fix for some time to develop in virt with fake
numa without problems (like real hardware).

Andrea Arcangeli (1):
  numa_emulation: fix cpumask_of_node()

 arch/x86/mm/numa_emulation.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH] numa_emulation: fix cpumask_of_node()
  2012-03-16 19:28 [PATCH] numa_emulation fix Andrea Arcangeli
@ 2012-03-16 19:28 ` Andrea Arcangeli
  0 siblings, 0 replies; 2+ messages in thread
From: Andrea Arcangeli @ 2012-03-16 19:28 UTC (permalink / raw)
  To: linux-mm, linux-numa; +Cc: Andi Kleen, Johannes Weiner, Andrew Morton

Without this fix the cpumask_of_node() for a fake=numa=2 is:

cpumask 0 ff
cpumask 1 ff

with the fix it's correct and it's set to:

cpumask 0 55
cpumask 1 aa

Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
---
 arch/x86/mm/numa_emulation.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/mm/numa_emulation.c b/arch/x86/mm/numa_emulation.c
index 46db568..740b0a3 100644
--- a/arch/x86/mm/numa_emulation.c
+++ b/arch/x86/mm/numa_emulation.c
@@ -60,7 +60,7 @@ static int __init emu_setup_memblk(struct numa_meminfo *ei,
 	eb->nid = nid;
 
 	if (emu_nid_to_phys[nid] == NUMA_NO_NODE)
-		emu_nid_to_phys[nid] = pb->nid;
+		emu_nid_to_phys[nid] = nid;
 
 	pb->start += size;
 	if (pb->start >= pb->end) {

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-03-16 19:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-16 19:28 [PATCH] numa_emulation fix Andrea Arcangeli
2012-03-16 19:28 ` [PATCH] numa_emulation: fix cpumask_of_node() Andrea Arcangeli

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).