summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorAndi Kleen <ak@suse.de>2005-01-03 04:48:54 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-01-03 04:48:54 -0800
commit29ee39a648bf341a35c0a795961ed29fc2d20a9e (patch)
tree9dcf00e859f115c1c4a0f8cfb7ea2755e5098604 /include/linux
parent717a232692bf0fa8c28d5c30f753cce6c062b866 (diff)
[PATCH] x86_64: Add SLIT (inter node distance) information to sysfs.
Add SLIT (inter node distance) information to sysfs. [This is Jack's patch that he submitted on l-k. I'm submitting it for him because I need it for my x86-64 followon SLIT patch. Hope I don't stomp onto his toes with that one. If you already merged it please ignore] From: Jack Steiner Here is an update patch to externalize the SLIT information. I think I have encorporated all the comments that were posted previously) For example: # cd /sys/devices/system # find . ./node ./node/node5 ./node/node5/distance ./node/node5/numastat ./node/node5/meminfo ./node/node5/cpumap # cat ./node/node0/distance 10 20 64 42 42 22 # cat node/*/distance 10 20 64 42 42 22 20 10 42 22 64 84 64 42 10 20 22 42 42 22 20 10 42 62 42 64 22 42 10 20 22 84 42 62 20 10 Signed-off-by: Jack Steiner <steiner@sgi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/topology.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/topology.h b/include/linux/topology.h
index 10df2542653b..1206d5a983a9 100644
--- a/include/linux/topology.h
+++ b/include/linux/topology.h
@@ -55,7 +55,10 @@ static inline int __next_node_with_cpus(int node)
for (node = 0; node < numnodes; node = __next_node_with_cpus(node))
#ifndef node_distance
-#define node_distance(from,to) ((from) != (to))
+/* Conform to ACPI 2.0 SLIT distance definitions */
+#define LOCAL_DISTANCE 10
+#define REMOTE_DISTANCE 20
+#define node_distance(from,to) ((from) == (to) ? LOCAL_DISTANCE : REMOTE_DISTANCE)
#endif
#ifndef PENALTY_FOR_NODE_WITH_CPUS
#define PENALTY_FOR_NODE_WITH_CPUS (1)