[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [PATCH v3 1/6] xen/x86: Provide helpers for common code to access acpi_numa
- To: Jan Beulich <jbeulich@xxxxxxxx>
- From: Wei Chen <Wei.Chen@xxxxxxx>
- Date: Mon, 29 Aug 2022 08:46:53 +0000
- Accept-language: en-US
- Arc-authentication-results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com])
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
- Arc-message-signature: i=2; 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=j1YcX7aTy6VetbRllemKCAlm2k0/XB/FgLBgsk2WXsA=; b=CnyW166dbflaSS5ewV2Ikg7ue/6qLoumrxPVlvtEL71QyTJMJVIq1dHz+VW5/bvNf2Ao1jlcS2q6i8/QvmHYCBpTV4A5gJ02s9FCGnUbRGZMWsVl2lcXstJvYVwBBtY1KQIzNCsWEQX2gjgaXpK00yyZBhmMw+s1B+P1N0RK4v0SwRrHh++jCktG010ilTPHNAVQzwtEq9RMp2C+xSquWPWH3lIMSRU9TsD0R3sMnDgR9HZW82Dcx+BbkD2+LogAb9FrZ+zb0iqAW4v4Gy32eoVdAT+v8ndGad1HIdIfmiKSxgWKhCzJGwecEC5q+T/wuw16sY4kWFK1DRCukx+Kcw==
- 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=j1YcX7aTy6VetbRllemKCAlm2k0/XB/FgLBgsk2WXsA=; b=b9wr4IAkHdVZQ3SNL6uVDYquVxQMjcPbvpMrRz/axO/f+R5fPKQ8IFeHFVhdZvsHdcifnhg7WP6P/n/z0CMTnLakKE+Vu3iA8//Rr+x23IRf2HFnWE8EZppRqVbp3jTzK6Pjnfn8BlkAJkqzT/hzzwdsFESJQlnOLGdDmG13ZZP/ZUeA1IebGKIh2pj+EEVpGxeWkypVVTA0N3BwAJ0XgnUdqfdOzR8GPhw5HloZZ0nW9S/FLcliDo4RVuUOSIP1n11e+d382ol5nDlSb1MNonRlmwuDRi1LSKZ8RkiQl63IUCFi/p1uYBv23tu05HcjWdSZxw7hPXMYaY3k800QTA==
- Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=mJLzIN/O7YwDzfm4ARt+9dkYuc2yCp07+l2Iek/JzRizIoOvh/juj3y2OLu0GxbmculbHrMUIm8eJJodcGLutnzxKoDMBSYd8xArp4iHa0UmrbTV9SQQ+W2nzHGDbft3jQdBou+GPwFR6d9C9b1cJkxN2Ma63PQNJ45bVoJLp5L7B1cQ+P3LYqKIwUj8LnJ4IgxN7U9JoOMUTgntfwU8ex4oj0CkcYeHlbrvKa7ChwfdYIMVZnN5vRKpeBCoxFBUylblWAf9GjBTKCikfI8cP3DYx4UfaFdTUjvXAPWMcZpv8iFrwSZZ7bCm3QEC9kowarcfOhtINhTCrMFZ/NohQQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YLEMHZeBOS+TYj5xCFZ9y5guOgNShNP4H2zzZsIDjasc4pi2Ug2hKRNomydS3rLD5HHr8PHb6q1KVjr3yzMy+UNIL//yk8SC5kNDO+ozMDq+Sc1d0dHBvTjMNHQ1fDk+EEeadv1w4eC53vBv2cRw+PO8syU+HdBd+ybQt2l1N1AvGSSajatA/7RWwDjs0M4rZXGmbGin7Z+RBKXb5RoVLTxRC5SVlxJsVgfcFoirS3gn8wN/8tvYRxOJZ8Nln7P/1n9raJLGt/w0/NzVCm+Za0zrQxoKHF4fqHAwwBMq+TvrscdEzibBN+1W6YreAPwonAOMJ+6sk/soXKBwxoD8Vw==
- Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
- Cc: nd <nd@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- Delivery-date: Mon, 29 Aug 2022 08:47:25 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Nodisclaimer: true
- Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
- Thread-index: AQHYtdMuStODhqLRIUWXc955/EIfNq2/bFqAgAYumSA=
- Thread-topic: [PATCH v3 1/6] xen/x86: Provide helpers for common code to access acpi_numa
Hi Jan,
> -----Original Message-----
> From: Jan Beulich <jbeulich@xxxxxxxx>
> Sent: 2022年8月25日 18:18
> To: Wei Chen <Wei.Chen@xxxxxxx>
> Cc: nd <nd@xxxxxxx>; Andrew Cooper <andrew.cooper3@xxxxxxxxxx>; Roger Pau
> Monné <roger.pau@xxxxxxxxxx>; Wei Liu <wl@xxxxxxx>; xen-
> devel@xxxxxxxxxxxxxxxxxxxx
> Subject: Re: [PATCH v3 1/6] xen/x86: Provide helpers for common code to
> access acpi_numa
>
> On 22.08.2022 04:58, Wei Chen wrote:
> > --- a/xen/arch/x86/include/asm/numa.h
> > +++ b/xen/arch/x86/include/asm/numa.h
> > @@ -32,8 +32,9 @@ extern void numa_add_cpu(int cpu);
> > extern void numa_init_array(void);
> > extern bool numa_off;
> >
> > -
> > -extern int srat_disabled(void);
> > +extern int arch_numa_setup(const char *opt);
> > +extern bool arch_numa_disabled(bool init_as_disable);
>
> What is the parameter name intended to mean? Since the only caller
> passes "false", this also isn't really possible to guess from the
> use(s) in this patch. In any event perhaps best for the parameter
> to be introduced only once it's actually needed.
>
This parameter will be used in patch#5 and set to true, I will introduce
this parameter in that patch.
> > --- a/xen/arch/x86/numa.c
> > +++ b/xen/arch/x86/numa.c
> > @@ -50,9 +50,31 @@ nodemask_t __read_mostly node_online_map = { { [0] =
> 1UL } };
> > bool numa_off;
> > s8 acpi_numa = 0;
> >
> > -int srat_disabled(void)
> > +int __init arch_numa_setup(const char *opt)
> > {
> > - return numa_off || acpi_numa < 0;
> > +#ifdef CONFIG_ACPI_NUMA
> > + if ( !strncmp(opt, "noacpi", 6) )
> > + {
> > + numa_off = false;
> > + acpi_numa = -1;
> > + return 0;
>
> With this "return" ...
>
> > + }
> > + else
>
> ... this "else" is unnecessary and hence would better be dropped,
> not the least to ...
>
> > +#endif
> > + return -EINVAL;
>
> ... avoid the otherwise ambiguous indentation of this line.
>
This is a good suggestion, current indentation looks weird, I will fix above 3
in next version.
Thanks,
Wei Che
> Jan
|