Skip to contentSkip to conversation

xen: Allow NUMA node to be specific to alloc_domheap_pages() via a new

PATCH Alex Williamson 1 participant 1 message Apr 4, 2008 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 17 lines · Xen staging patchbot-unstable

diff -r 0834234fd668 -r 57febe0264e1 xen/include/xen/numa.h

xen/include/xen/numa.h Fri Apr 04 10:48:01 2008 +0100 renamed from xen/include/xen/numa.h Fri Apr 04 10:18:45 2008 +0100 +7 -0
@@ -8,6 +8,13 @@
 #define NODES_SHIFT     0
 #endif
 
+#define NUMA_NO_NODE    0xFF
+
 #define MAX_NUMNODES    (1 << NODES_SHIFT)
 
+#define vcpu_to_node(v) (cpu_to_node[(v)->processor])
+
+#define domain_to_node(d) \
+  (((d)->vcpu[0] != NULL) ? vcpu_to_node((d)->vcpu[0]) :
 NUMA_NO_NODE)
+
Quoted 1 line

#endif /* _XEN_NUMA_H */

The cpu_to_node[] array is arch specific. The cpu_to_node() macro is
the mechanism to abstract this across archs. Thanks,

Alex

--

xen/include/xen/numa.h +1 -1
diff -r 80f3c86feb7f xen/include/xen/numa.h
@@ -12,7 +12,7 @@
 
 #define MAX_NUMNODES    (1 << NODES_SHIFT)
 
-#define vcpu_to_node(v) (cpu_to_node[(v)->processor])
+#define vcpu_to_node(v) (cpu_to_node((v)->processor))
 
 #define domain_to_node(d) \
   (((d)->vcpu[0] != NULL) ? vcpu_to_node((d)->vcpu[0]) : NUMA_NO_NODE)