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

Re: [PATCH v6 2/6] xen/x86: move generically usable NUMA code from x86 to common


  • To: Henry Wang <Henry.Wang@xxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 19 Oct 2022 08:55:25 +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=pJgE8w/judukBxWXoRVGDNHZ5U7gAKDQRqwYYFOvqag=; b=WmnW4ogb49uPf6Lu3ZwUICrkKaOGNKT00dvyTmTWu6DQWmort3okonFaNWPiBym97mQw97GdHssWszuOxIJF8fh1PPdCQf+unZVZQl7PtKnH0AZBD/Q5FetjjLyEyCPnqml0ae4e6osfST1vM+zKqPsB54MmAgII2GKNnoy1PqefcR5Vqyv5m60iqcPJgAViOIZ06FhnLgHCzGpuslp3KATqDuDU5WUorQsEG5J/woqu5pMU44jWEjTq4lTOeCQZL0whxh+Pfrd+q3S54SQ9+n4eJSXMrkEjs+dWnF+wh/dfGP1etUJj5R9T3YHwJy6DF6NRzEDCLhz5N9d2Q/n4Tw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IlxLUa/naAtdjqpzFY10N+MYEX/hTkqOhUYSDaiC1tYnxJ5l8qvkmwRWXknXpYKGKSyRSWG8xmD444EhXFtyGE43ywypyfR92h3cFRHHDJW9FMBdfzx7iHiP+8dFNvnh305lol4k3Vv4TCEXwtjqAWJR46i+iyqCMshxed6UCwXcYyWTq0VgAlOGmlR9KFWKYb+CSaIdtnka4A8Y+sLEs2KSaM4mxdPIZGax+9yrLPGE23ONRheYisv7hp41X5hf4zSMGGycQzqwyAlEYFnBJYeZ6lt3oHHF2NNRUi2bYyM+1un3wpzfDFsVCp4uivbAvWHMQC2T1XCKDjzlod4Zgg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: nd <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" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Wei Chen <Wei.Chen@xxxxxxx>
  • Delivery-date: Wed, 19 Oct 2022 06:55:34 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 19.10.2022 08:50, Henry Wang wrote:
>> -----Original Message-----
>> Subject: Re: [PATCH v6 2/6] xen/x86: move generically usable NUMA code
>> from x86 to common
>>
>> On 11.10.2022 13:17, Wei Chen wrote:
>>> v5 -> v6:
>>>  1. Replace numa_scan_node to numa_process_nodes in commit log.
>>>  2. Limit the scope of page_num_node, vnuma and page of numa_setup
>>>     function.
>>>  3. Use memset to init page_num_node instead of for_each_online_node.
>>>  4. Use %u instead of %d for nodeid_t and j in numa_setup print
>>>     messages.
>>
>> The only instances of nodeid_t typed variable uses that I was able to
>> find are in dump_numa(). I guess you can leave them that way, but
>> strictly speaking %u isn't correct to use for nodeid_t (as it promotes
>> to int, not to unsigned int).
> 
> Sorry for suddenly jumping into the discussion. Firstly thanks Jan for
> the review :))
> 
> I am a little bit confused here, nodeid_t is defined as:
> typedef u8 nodeid_t;
> 
> so I think here %u should be probably fine (I may have missed
> something though)?

%u is indeed "probably fine" (hence me saying that they can be left that
way), but from a strict language perspective it isn't: unsigned types
more narrow than "int" promote to "int", not "unsigned int" (and type
promotion kicks in when passing arguments to functions where only
ellipsis is specified, i.e. parameter type information isn't available).

Jan



 


Rackspace

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