[PATCH 2/7] numa-add-generic-percpu-var-numa_node_id-implementation-fix2

Lee Schermerhorn <[email protected]>
Newsgroups org.kernel.vger.linux-numa,org.kernel.vger.linux-arch,org.kvack.linux-mm
Message-ID <[email protected]>
Incremental patch 2 to
numa-add-generic-percpu-var-numa_node_id-implementation.patch
in 28apr10 mmotm.

Define generic macro to set 'numa_node' for a specified cpu as
suggested by Christoph Lameter and seconded by Tejun Heo.

Signed-off-by: Lee Schermerhorn <[email protected]>

 include/linux/topology.h |    7 +++++++
 1 file changed, 7 insertions(+)

Index: linux-2.6.34-rc5-mmotm-100428-1653/include/linux/topology.h
===================================================================
--- linux-2.6.34-rc5-mmotm-100428-1653.orig/include/linux/topology.h
+++ linux-2.6.34-rc5-mmotm-100428-1653/include/linux/topology.h
@@ -232,6 +232,13 @@ static inline void set_numa_node(int nod
 }
 #endif
 
+#ifndef set_cpu_numa_node
+static inline void set_cpu_numa_node(int cpu, int node)
+{
+	per_cpu(numa_node, cpu) = node;
+}
+#endif
+
 #else	/* !CONFIG_USE_PERCPU_NUMA_NODE_ID */
 
 /* Returns the number of the current Node. */
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.