WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] Re: [Xen-staging] [xen-unstable] xen: Allow NUMA nod

To: Keir Fraser <keir.fraser@xxxxxxxxxx>, andre.przywara@xxxxxxx
Subject: [Xen-devel] [PATCH] Re: [Xen-staging] [xen-unstable] xen: Allow NUMA node to be specific to alloc_domheap_pages() via a new
From: Alex Williamson <alex.williamson@xxxxxx>
Date: Fri, 04 Apr 2008 09:06:16 -0600
Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Fri, 04 Apr 2008 08:06:47 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <200804040950.m349oNaN021266@xxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: OSLO R&D
References: <200804040950.m349oNaN021266@xxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Fri, 2008-04-04 at 10:50 +0100, Xen staging patchbot-unstable wrote:
> diff -r 0834234fd668 -r 57febe0264e1 xen/include/xen/numa.h
> --- a/xen/include/xen/numa.h    Fri Apr 04 10:18:45 2008 +0100
> +++ b/xen/include/xen/numa.h    Fri Apr 04 10:48:01 2008 +0100
> @@ -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)
> +
>  #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

Signed-off-by: Alex Williamson <alex.williamson@xxxxxx>
--

diff -r 80f3c86feb7f xen/include/xen/numa.h
--- a/xen/include/xen/numa.h    Fri Apr 04 15:43:01 2008 +0100
+++ b/xen/include/xen/numa.h    Fri Apr 04 09:03:49 2008 -0600
@@ -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)



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] Re: [Xen-staging] [xen-unstable] xen: Allow NUMA node to be specific to alloc_domheap_pages() via a new, Alex Williamson <=