Re: [PATCH 1/4] make dev_to_node return online node

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Greg KH <greg@...>, Ingo Molnar <mingo@...>
Cc: Andrew Morton <akpm@...>, Linux Kernel Mailing List <linux-kernel@...>
Date: Wednesday, February 20, 2008 - 4:41 pm

please use this one instead. this one is less intrusive, and pcibus_to_node will work too
and don't need other changes.

YH

---

[PATCH] make dev_to_node return online node v2

some numa system ( with multi HT chains) may return node without ram. aka it
is not online.
try to get one online node, otherwise return -1

Signed-off-by: Yinghai Lu <yinghai.lu@sun.com>

diff --git a/arch/x86/pci/acpi.c b/arch/x86/pci/acpi.c
index c163ad1..2c1a651 100644
--- a/arch/x86/pci/acpi.c
+++ b/arch/x86/pci/acpi.c
@@ -213,6 +213,9 @@ struct pci_bus * __devinit pci_acpi_scan_root(struct acpi_device *device, int do
 		set_mp_bus_to_node(busnum, node);
 	else
 		node = get_mp_bus_to_node(busnum);
+
+	if (node != -1 && !node_online(node))
+		node = -1;
 #endif
 
 	/* Allocate per-root-bus (not per bus) arch-specific data.
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 2/4] x86_64: fix dma_alloc_pages v2, Yinghai Lu, (Wed Feb 20, 4:36 am)
Re: [PATCH 2/4] x86_64: fix dma_alloc_pages v2, Yinghai Lu, (Wed Feb 20, 6:07 am)
[PATCH 1/4] make dev_to_node return online node, Yinghai Lu, (Wed Feb 20, 4:32 am)
Re: [PATCH 1/4] make dev_to_node return online node, Yinghai Lu, (Wed Feb 20, 4:41 pm)