[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [XEN RFC PATCH 03/40] xen/x86: Initialize memnodemapsize while faking NUMA node
- To: Wei Chen <Wei.Chen@xxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Fri, 13 Aug 2021 10:29:15 +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-SenderADCheck; bh=cgHFpBPUTtKPSQ12C2/+K29SL7vgOoAvq5winQVXTLI=; b=TCCIaV3Q3mLXNRCPdeNL6x6iDfE0p6In/+AkXLCbWTwdc9D5uURpicyaDnfnI+6nWYRlA7B15m13TXCZP7gwQUxp9DdNiYqVkqt+fGBQXxAY3obkMnGjPjwn787gO4pzdojBwaXL4/HkzrozDeokbTxDlc6Gj3wpfsc34aE6pjs2l03NhbEalmplCMdBVUqU/CNEzI8Ptt7rVB3ydWKxHfrKL8jtnseo8VecpHIXZJDkzSC5vXbsrT61e1Lt0J0vsZSXbxG83cly5zyj6pui5ZmoeadX5m9JkdZXHhk3Z6TJHuUq6JF54KKI+9QOm98JoEFhIDcEu1nhcnwj/Gs/qw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CbFBvbDmdGOtam1CQRwJq1xbYI+UpQBmpkZm7bpcZYKTIm4LEHMTzTStONpvs/Ed64sosyNp9vRqXNbN38171q1pU2AostzQIyCcNFWVDtfoA7GhFSyKT3Y0UfyCzlDDskfKZRZVg+DVKNUUNJXixdCpH/oSP8dF+WMqHRfFNnvI0xtYYSyeLI6ZB3vsmf033Yz3yX1i0tOb6MndnfDti7OAso8HWKxR9DQZPM1yrqciEXE6l4l1ob8CX3TPdhRItDqcD0m2fW5mSJhtPvDIjUARv7YcmeqYncMqVler+oAlx1gLIdH4VYOwviTmCnDrqMpRBkgNpIXOI+CO48zizQ==
- Authentication-results: xen.org; dkim=none (message not signed) header.d=none;xen.org; dmarc=none action=none header.from=suse.com;
- Cc: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "sstabellini@xxxxxxxxxx" <sstabellini@xxxxxxxxxx>, "julien@xxxxxxx" <julien@xxxxxxx>
- Delivery-date: Fri, 13 Aug 2021 08:29:37 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 13.08.2021 09:26, Wei Chen wrote:
>> From: Jan Beulich <jbeulich@xxxxxxxx>
>> Sent: 2021年8月12日 23:33
>>
>> On 11.08.2021 12:23, Wei Chen wrote:
>>> --- a/xen/arch/x86/numa.c
>>> +++ b/xen/arch/x86/numa.c
>>> @@ -270,6 +270,8 @@ void __init numa_initmem_init(unsigned long
>> start_pfn, unsigned long end_pfn)
>>> /* setup dummy node covering all memory */
>>> memnode_shift = BITS_PER_LONG - 1;
>>> memnodemap = _memnodemap;
>>> + memnodemapsize = ARRAY_SIZE(_memnodemap);
>>
>> But this doesn't reflect reality then, does it? We'd rather want to
>> set the size to 1, I would think.
>>
>
> Yes, you're right. Actually, we just only used 1 slot. But furthermore,
> memnodemap[0] may be set in acpi_scan_nodes, but acpi_scan_nodes doesn't
> reset memnodemap when it failed. I think maybe we can add:
> memnodemap[0] = 0;
> memnodemapsize = 1;
> How do you think about it?
Well, yes, if data may have been put there, then resetting of course
makes sense.
Jan
|