[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 3/9] xen/x86: move generically usable NUMA code from x86 to common
- To: Wei Chen <wei.chen@xxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Wed, 13 Jul 2022 16:10:24 +0200
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=vO51oXF9hvdPBCZcvmnyXvB5mKwtxNhDW77IFfIfZjc=; b=GFpVe5ckDsB1Fo7pVl3UdkOvAAAHU1V30nIN+2MDMTidlgiaDvzH+XIarUh3hMxCUbF3ho0MyRUKkRdaDkwd6MsECQslL1GDF5hPjbp9TV8KFfSVut2GRLkJV4gvu849tTNBKUe2e0F69vLwQ3HlBd9/d9ORf3L7R5LeP7q82T17aE6Sze1n2AdbLAvgrb50DCFynFpH/JZHrr/406U3vBpY1ucDOoFmt/xrumXgY8LgMg7DPUJGiEc9RV+4IoJfAZnHjqoCJN0whSJ0UBEKRzEvii4otW94D55iSEe29Q84Til/1v7Lf1E4kqVZPm8HqI9uLxHrTtBmxrPv5O7FDg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=d5lbu11iq/HA+yG4j1F7vgWiuGmQ1Wgk5zM7sUAoUJiDGTu1EHOic4TmT/L123VkSfiy9c0catGluwXQQUs7K8VD/01Rd6EHTWNjDdeEQVdz1/YODm8aMoUKZIGVMq5NYcudL2KfN2AGO15VOstOwZpxxGhsqahI4B8d/ynmt1jn6fgmb/96OEK5UdGey1uY+MFe5hm1qy0iqD+WjffXS1vVz3sCPiJBzuyhnaPMNz4YKuQ4YFQtKVqrzkdya4Hyg5SuQSgDIDmZUfD16mvi97RZx2wk5TKsXTlXTT++6+alzuXV/WMb9fto23XE74ga1Ig7xuFX1CyDnYqRnXd1/A==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
- Cc: nd@xxxxxxx, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
- Delivery-date: Wed, 13 Jul 2022 14:10:51 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
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 <ryanh@xxxxxxxxxx>
>> + */
>> +
>> +#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
|