aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-x86_64/topology.h
diff options
context:
space:
mode:
authorAndi Kleen <ak@suse.de>2005-11-05 17:25:53 +0100
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-14 19:55:14 -0800
commit69d81fcde7797342417591ba7affb372b9c86eae (patch)
tree97fbc73fd20f8ebc313b2bc41367a8efe36c2c3d /include/asm-x86_64/topology.h
parent[PATCH] x86_64: Fix gcc 4 warning in aperture.c (diff)
downloadlinux-dev-69d81fcde7797342417591ba7affb372b9c86eae.tar.xz
linux-dev-69d81fcde7797342417591ba7affb372b9c86eae.zip
[PATCH] x86_64: Speed up numa_node_id by putting it directly into the PDA
Not go from the CPU number to an mapping array. Mode number is often used now in fast paths. This also adds a generic numa_node_id to all the topology includes Suggested by Eric Dumazet Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/asm-x86_64/topology.h')
-rw-r--r--include/asm-x86_64/topology.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/asm-x86_64/topology.h b/include/asm-x86_64/topology.h
index 1c603cd7e4d0..d39ebd5263ed 100644
--- a/include/asm-x86_64/topology.h
+++ b/include/asm-x86_64/topology.h
@@ -28,6 +28,8 @@ extern int __node_distance(int, int);
#define pcibus_to_node(bus) ((long)(bus->sysdata))
#define pcibus_to_cpumask(bus) node_to_cpumask(pcibus_to_node(bus));
+#define numa_node_id() read_pda(nodenumber)
+
/* sched_domains SD_NODE_INIT for x86_64 machines */
#define SD_NODE_INIT (struct sched_domain) { \
.span = CPU_MASK_NONE, \