From: Alex Williamson <alex.williamson@hp.com>
To: Keir Fraser <keir.fraser@citrix.com>, andre.przywara@amd.com
Cc: xen-devel <xen-devel@lists.xensource.com>
Subject: [PATCH] Re: [Xen-staging] [xen-unstable] xen: Allow NUMA node to be specific to alloc_domheap_pages() via a new
Date: Fri, 04 Apr 2008 09:06:16 -0600 [thread overview]
Message-ID: <1207321576.7591.3.camel@lappy> (raw)
In-Reply-To: <200804040950.m349oNaN021266@latara.uk.xensource.com>
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@hp.com>
--
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)
parent reply other threads:[~2008-04-04 15:06 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <200804040950.m349oNaN021266@latara.uk.xensource.com>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1207321576.7591.3.camel@lappy \
--to=alex.williamson@hp.com \
--cc=andre.przywara@amd.com \
--cc=keir.fraser@citrix.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.