[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [RFC PATCH v2 10/25] x86: NUMA: Move numa code and make it generic





On 05/09/2017 08:39 AM, Vijay Kilari wrote:
On Mon, May 8, 2017 at 10:21 PM, Julien Grall <julien.grall@xxxxxxx> wrote:
On 28/03/17 16:53, vijay.kilari@xxxxxxxxx wrote:
+static int numa_setup(char *s);
+custom_param("numa", numa_setup);
+
+struct node_data node_data[MAX_NUMNODES];
+
+/* Mapping from pdx to node id */
+unsigned int memnode_shift;
+static typeof(*memnodemap) _memnodemap[64];


Also, you move the hardcoded 64 here. But have you checked it is valid for
ARM?

Regardless that, this sounds like something that should be turned into a
define and require a comment.

64 is good enough. This _memnodemap is used in case of NUMA failed or off,
in which case memnode_shift is 63 (BITS_PER_LONG -1).

If it based on BITS_PER_LONG, then you should use BITS_PER_LONG (via a proper define) rather than hardcoding it.


--
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.