[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1381871264-14070-1-git-send-email-toshi.kani@hp.com>
Date: Tue, 15 Oct 2013 15:07:44 -0600
From: Toshi Kani <toshi.kani@...com>
To: mingo@...nel.org, hpa@...or.com, tglx@...utronix.de
Cc: akpm@...ux-foundation.org, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, x86@...nel.org,
linux-pci@...r.kernel.org, yinghai@...nel.org, tj@...nel.org,
rientjes@...gle.com, isimatu.yasuaki@...fujitsu.com,
Toshi Kani <toshi.kani@...com>
Subject: [PATCH] x86/numa: Allow node distance table to have I/O nodes
When a system has I/O devices (ex. PCI bridges) with their own
locality, the following error message shows up.
NUMA: Warning: node ids are out of bound, from=-1 to=-1 distance=10
acpi_numa_slit_init() calls numa_set_distance(), which assumes
that all nodes on the system have been parsed with SRAT already.
However, SRAT does not list I/O devices. SLIT has the distance
table for all localities including I/Os. Hence, the above message
shows up when a system has a unique I/O device locality.
This patch changes acpi_numa_slit_init() to make sure all the
nodes are parsed, so that it can initialize the distance table
with all the localities.
The following map tables may contain I/O nodes as a result.
- numa_distance[], i.e. node distance table
- node_states[N_POSSIBLE], aka. node_possible_map
- mp_bus_to_node[], i.e. pci bus# to node# map
There is no functional change since there is no code that makes
use of the I/O nodes.
- I/O nodes are set to off-line.
- pci_acpi_scan_root() continues to set -1 to pci_sysdata.node
of a PCI bridge with a unique locality (per commit b755de8d).
Signed-off-by: Toshi Kani <toshi.kani@...com>
---
arch/x86/mm/srat.c | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/arch/x86/mm/srat.c b/arch/x86/mm/srat.c
index 26f4e12..fb5bd73 100644
--- a/arch/x86/mm/srat.c
+++ b/arch/x86/mm/srat.c
@@ -45,7 +45,20 @@ static __init inline int srat_disabled(void)
/* Callback for SLIT parsing */
void __init acpi_numa_slit_init(struct acpi_table_slit *slit)
{
- int i, j;
+ int node, i, j;
+
+ /* SLIT may have I/O nodes, which are not listed in SRAT */
+ for (i = 0; i < slit->locality_count; i++) {
+ if (pxm_to_node(i) != NUMA_NO_NODE)
+ continue;
+
+ node = setup_node(i);
+ if (WARN_ONCE(node < 0, "SLIT: Too many proximity domains.\n"))
+ continue;
+
+ node_set(node, numa_nodes_parsed);
+ pr_info("SLIT: Node %u PXM %u I/O only\n", node, i);
+ }
for (i = 0; i < slit->locality_count; i++)
for (j = 0; j < slit->locality_count; j++)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists