From: Boris Ostrovsky <boris.ostrovsky@oracle.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: kevin.tian@intel.com, keir@xen.org, ian.campbell@citrix.com,
Andrew.Cooper3@citrix.com, dario.faggioli@citrix.com,
tim@xen.org, xen-devel@lists.xen.org,
stefano.stabellini@citrix.com, yang.z.zhang@intel.com
Subject: Re: [PATCH] x86/numa: Adjust datatypes for node and pxm
Date: Mon, 23 Feb 2015 09:42:41 -0500 [thread overview]
Message-ID: <54EB3C61.1060606@oracle.com> (raw)
In-Reply-To: <54EB07B10200007800062614@mail.emea.novell.com>
On 02/23/2015 04:57 AM, Jan Beulich wrote:
>>>> On 21.02.15 at 19:14, <boris.ostrovsky@oracle.com> wrote:
>> Use u8-sized node IDs and unsigned PXMs consistently throughout
>> code (and introduce nodeid_t type).
>>
>> Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
> I think the description should call out areas not covered, like the
> node encoding in the top bits of MEMF_*.
>
>> --- a/xen/arch/x86/srat.c
>> +++ b/xen/arch/x86/srat.c
>> @@ -21,44 +21,55 @@
>> #include <asm/e820.h>
>> #include <asm/page.h>
>>
>> +#define MAX_PXM 255
> Perhaps better (MAX_NUMNODES - 1) than a literal number? Or
> even do away with it altogether, use MAX_NUMNODES - 1 in the
> array definition and ARRAY_SIZE() elsewhere?
I am not sure we can do this: PXMs are not guaranteed to be zero-based.
And, in fact, the way we map PXMs to nodes is not quite right because of
this --- it just so happens that PXMs are usually under 255 (and
zero-based) and we can use them as index to 255-sized array. IIRC the
spec defines them as 32-bit values.
-boris
next prev parent reply other threads:[~2015-02-23 14:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-21 18:14 [PATCH] x86/numa: Adjust datatypes for node and pxm Boris Ostrovsky
2015-02-23 9:57 ` Jan Beulich
2015-02-23 14:42 ` Boris Ostrovsky [this message]
2015-02-23 14:47 ` Jan Beulich
2015-02-23 14:53 ` Boris Ostrovsky
2015-02-23 15:14 ` Jan Beulich
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=54EB3C61.1060606@oracle.com \
--to=boris.ostrovsky@oracle.com \
--cc=Andrew.Cooper3@citrix.com \
--cc=JBeulich@suse.com \
--cc=dario.faggioli@citrix.com \
--cc=ian.campbell@citrix.com \
--cc=keir@xen.org \
--cc=kevin.tian@intel.com \
--cc=stefano.stabellini@citrix.com \
--cc=tim@xen.org \
--cc=xen-devel@lists.xen.org \
--cc=yang.z.zhang@intel.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.