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

Re: [PATCH v2 02/17] xen/arm: implement helpers to get and update NUMA status


  • To: Wei Chen <Wei.Chen@xxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 12 Jan 2023 09:08:23 +0100
  • 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=NXvbY2AMJ6MkxksEorH/5cWem3dkgzZzT9MoggQzB2s=; b=HfIsdUzx0ycyYQyFpcVw/f3F11BVVLAyatKF4BsgAwnT85Xf0EQdvkNTuGqhSwh7+QaeHJRR1sy4hZLLkQ/PUnPVSVE693yr96RpkD8OtAQmSTcKXet3zWN5BYlpfmN/dU+jxXacHQMykYhT573uMFQVWNs76dApfh8UgHTj2mr8N2S9xyCmi9TF4O0nxJaNeDkAKt4zizEW+9bS1TajAdMzRI8GPh5yit/j6HoU3bIRUfWi+gUs4drMNAErZ0VN1hRPjMRmQ7pYxSMFodEkcUmTmhyr+g7/cL5SLtO5HanSgNRcE0OF7VdTYwNB9xEzdjuQ6YPki91DvF+FS3fzjQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mo+q1YZXF8nvt9ZtuWLwUIpEN6FszF+4Y0EKi0xJ0TNg0U6g+l7q/fFH2goqv4lwmlqmENp9CBMOrintBD3sa9Oe6Q8g1S5yPa3RP+0aDIdhOGxuIs4oi7Um/8dcnUr6DHe/jWaGA89vqghm8gilju+O8qsbr3UIvXTf7gWw+XiIDlqiTMZAqdaCFpvyCxaIpmkNRBN2RRs28SycpcMtAaisvuBPF+07cqRQXLqDgw3VgSf2az033STmULBpvY7koiI/unaxXjMXhg/Y3Vl2V05D4FcAUUd5zoMXyGUUlQO/Lu8XnI//qQ7qzcNxevKZ4P7gAvbjVtcIjawi7PWIIQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: nd <nd@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 12 Jan 2023 08:08:43 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 12.01.2023 07:22, Wei Chen wrote:
>> -----Original Message-----
>> From: Jan Beulich <jbeulich@xxxxxxxx>
>> Sent: 2023年1月11日 0:38
>>
>> On 10.01.2023 09:49, Wei Chen wrote:
>>> --- a/xen/arch/arm/include/asm/numa.h
>>> +++ b/xen/arch/arm/include/asm/numa.h
>>> @@ -22,6 +22,12 @@ typedef u8 nodeid_t;
>>>   */
>>>  #define NR_NODE_MEMBLKS NR_MEM_BANKS
>>>
>>> +enum dt_numa_status {
>>> +    DT_NUMA_INIT,
>>
>> I don't see any use of this. I also think the name isn't good, as INIT
>> can be taken for "initializer" as well as "initialized". Suggesting an
>> alternative would require knowing what the future plans with this are;
>> right now ...
>>
> 
> static enum dt_numa_status __read_mostly device_tree_numa;

There's no DT_NUMA_INIT here. You _imply_ it having a value of zero.

> We use DT_NUMA_INIT to indicate device_tree_numa is in a default value
> (System's initial value, hasn't done initialization). Maybe rename it
> To DT_NUMA_UNINIT be better?

Perhaps, yes.

>>> --- a/xen/arch/x86/include/asm/numa.h
>>> +++ b/xen/arch/x86/include/asm/numa.h
>>> @@ -12,7 +12,6 @@ extern unsigned int numa_node_to_arch_nid(nodeid_t n);
>>>
>>>  #define ZONE_ALIGN (1UL << (MAX_ORDER+PAGE_SHIFT))
>>>
>>> -extern bool numa_disabled(void);
>>>  extern nodeid_t setup_node(unsigned int pxm);
>>>  extern void srat_detect_node(int cpu);
>>>
>>> --- a/xen/include/xen/numa.h
>>> +++ b/xen/include/xen/numa.h
>>> @@ -55,6 +55,7 @@ extern void numa_init_array(void);
>>>  extern void numa_set_node(unsigned int cpu, nodeid_t node);
>>>  extern void numa_initmem_init(unsigned long start_pfn, unsigned long
>> end_pfn);
>>>  extern void numa_fw_bad(void);
>>> +extern bool numa_disabled(void);
>>>
>>>  extern int arch_numa_setup(const char *opt);
>>>  extern bool arch_numa_unavailable(void);
>>
>> How is this movement of a declaration related to the subject of the patch?
>>
> 
> Can I add some messages in commit log to say something like "As we have
> Implemented numa_disabled for Arm, so we move numa_disabled to common header"?

See your own patch 3, where you have a similar statement (albeit you mean
"declaration" there, not "definition"). However, right now numa_disabled()
is a #define on Arm, so the declaration becoming common isn't really
warranted. In fact it'll get in the way of converting function-like macros
to inline functions for Misra.

Jan



 


Rackspace

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