LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] Fix NUMA emulation for x86_64
@ 2008-01-25  8:16 Minoru Usui
  2008-01-25 10:41 ` Ingo Molnar
  0 siblings, 1 reply; 3+ messages in thread
From: Minoru Usui @ 2008-01-25  8:16 UTC (permalink / raw)
  To: linux-kernel; +Cc: magnus.damm

I found a small bug of NUMA emulation code for x86_64. (CONFIG_NUMA_EMU)
If machine is non-NUMA, find_node_by_addr() should return
NUMA_NO_NODE, but current implementation code returns existent maximum
NUMA node number + 1. 
This is not existent NUMA node number.

However, this behaviour does not affect NUMA emulation fortunately, because
acpi_fake_nodes() that is caller of find_node_by_addr() gets pxm
(proximity domain) by node_to_pxm() from non-existent NUMA node number
that was returned by find_node_by_addr().
node_to_pxm() returns PXM_INVAL that means illegal or non-existent
NUMA node number.

Signed-off-by: Minoru Usui <usui@mxm.nes.nec.co.jp>
---
diff -ruNp linux-2.6.24-rc8/arch/x86/mm/srat_64.c dst/arch/x86/mm/srat_64.c 
--- linux-2.6.24-rc8/arch/x86/mm/srat_64.c      2008-01-16 14:22:15.000000000 +0900
+++ dst/arch/x86/mm/srat_64.c   2008-01-17 19:07:41.000000000 +0900
@@ -457,7 +457,7 @@ static int __init find_node_by_addr(unsi
                        break;
                }
        }
-       return i;
+       return ret;
 }
 
 /*

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

* Re: [PATCH] Fix NUMA emulation for x86_64
  2008-01-25  8:16 [PATCH] Fix NUMA emulation for x86_64 Minoru Usui
@ 2008-01-25 10:41 ` Ingo Molnar
  2008-01-30  2:59   ` Minoru Usui
  0 siblings, 1 reply; 3+ messages in thread
From: Ingo Molnar @ 2008-01-25 10:41 UTC (permalink / raw)
  To: Minoru Usui; +Cc: linux-kernel, magnus.damm


* Minoru Usui <usui@mxm.nes.nec.co.jp> wrote:

> I found a small bug of NUMA emulation code for x86_64. 
> (CONFIG_NUMA_EMU) If machine is non-NUMA, find_node_by_addr() should 
> return NUMA_NO_NODE, but current implementation code returns existent 
> maximum NUMA node number + 1. This is not existent NUMA node number.
>
> However, this behaviour does not affect NUMA emulation fortunately, 
> because acpi_fake_nodes() that is caller of find_node_by_addr() gets 
> pxm (proximity domain) by node_to_pxm() from non-existent NUMA node 
> number that was returned by find_node_by_addr(). node_to_pxm() returns 
> PXM_INVAL that means illegal or non-existent NUMA node number.

thanks, i have applied your fix to x86.git.

It seems this does not need to be backported to v2.6.24.1 because 
node_to_pxm() masked the bad effects of this bug, right?

	Ingo

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

* Re: [PATCH] Fix NUMA emulation for x86_64
  2008-01-25 10:41 ` Ingo Molnar
@ 2008-01-30  2:59   ` Minoru Usui
  0 siblings, 0 replies; 3+ messages in thread
From: Minoru Usui @ 2008-01-30  2:59 UTC (permalink / raw)
  To: mingo; +Cc: linux-kernel, magnus.damm

>>>>> ">" == Ingo Molnar <mingo@elte.hu> writes:

    >> * Minoru Usui <usui@mxm.nes.nec.co.jp> wrote:

    >> I found a small bug of NUMA emulation code for x86_64. 
    >> (CONFIG_NUMA_EMU) If machine is non-NUMA, find_node_by_addr() should 
    >> return NUMA_NO_NODE, but current implementation code returns existent 
    >> maximum NUMA node number + 1. This is not existent NUMA node number.
    >> 
    >> However, this behaviour does not affect NUMA emulation fortunately, 
    >> because acpi_fake_nodes() that is caller of find_node_by_addr() gets 
    >> pxm (proximity domain) by node_to_pxm() from non-existent NUMA node 
    >> number that was returned by find_node_by_addr(). node_to_pxm() returns 
    >> PXM_INVAL that means illegal or non-existent NUMA node number.

    >> thanks, i have applied your fix to x86.git.

    >> It seems this does not need to be backported to v2.6.24.1 because 
    >> node_to_pxm() masked the bad effects of this bug, right?

    >> 	Ingo

I think this bug is not urgency.
If you mean that it's not necessary to release 2.6.24.1 only for this
bug, I think so.

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

end of thread, other threads:[~2008-01-30  3:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-25  8:16 [PATCH] Fix NUMA emulation for x86_64 Minoru Usui
2008-01-25 10:41 ` Ingo Molnar
2008-01-30  2:59   ` Minoru Usui

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