On 12.07.2022 15:13, Jan Beulich wrote:
> On 08.07.2022 16:54, Wei Chen wrote:
>> --- /dev/null
>> +++ b/xen/common/numa.c
>> @@ -0,0 +1,439 @@
>> +/*
>> + * Generic VM initialization for NUMA setups.
>> + * Copyright 2002,2003 Andi Kleen, SuSE Labs.
>> + * Adapted for Xen: Ryan Harper <[email protected]>
>> + */
>> +
>> +#include <xen/init.h>
>> +#include <xen/keyhandler.h>
>> +#include <xen/mm.h>
>> +#include <xen/nodemask.h>
>> +#include <xen/numa.h>
>> +#include <xen/param.h>
>> +#include <xen/sched.h>
>> +#include <xen/softirq.h>
>> +#include <asm/acpi.h>
> 
> Isn't the goal for the now common code to not be dependent upon ACPI?
> 
>> +struct node_data node_data[MAX_NUMNODES];
>> +
>> +/* Mapping from pdx to node id */
>> +int memnode_shift;
>> +static typeof(*memnodemap) _memnodemap[64];
>> +unsigned long memnodemapsize;
>> +u8 *memnodemap;
> 
> For code moved, please switch to (in this case) uint8_t. I'm on the
> edge of asking to go further and
> - also use __read_mostly for some / all of these,

Actually where possible please prefer __ro_after_init over __read_mostly.
While this isn't properly enabled on Arm yet, it should at least not
cause problems, as the result section is covered by .data.* in the linker
script.

Jan

Reply via email to