summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2004-03-11 16:15:08 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-03-11 16:15:08 -0800
commit0eaf393b6b6ec017f48aa02ba90b1dd53ad16e65 (patch)
tree063a56f0a9ff9f4fb4bc097817292cf598f9b1db /include/linux
parent290d11d8c745f4bba07c13ee231976103dad2935 (diff)
[PATCH] NUMA-aware zonelist builder
From: <j-nomura@ce.jp.nec.com> The attached patch is NUMA-aware zonelist builder patch, which sorts zonelist in the order that near-node first, far-node last. In lse-tech and linux-ia64, where most of NUMA people resides, no objections are raised so far. The patch adds NUMA-specific version of build_zonelists which calls find_next_best_node to select the next-nearest node to add to zonelist. The patch has no effect on flat NUMA platform.
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/topology.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/topology.h b/include/linux/topology.h
index 5f7543009717..a78a177137d5 100644
--- a/include/linux/topology.h
+++ b/include/linux/topology.h
@@ -54,4 +54,11 @@ static inline int __next_node_with_cpus(int node)
#define for_each_node_with_cpus(node) \
for (node = 0; node < numnodes; node = __next_node_with_cpus(node))
+#ifndef node_distance
+#define node_distance(from,to) (from != to)
+#endif
+#ifndef PENALTY_FOR_NODE_WITH_CPUS
+#define PENALTY_FOR_NODE_WITH_CPUS (1)
+#endif
+
#endif /* _LINUX_TOPOLOGY_H */