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

Re: [PATCH v5 1/6] xen/x86: Provide helpers for common code to access acpi_numa


  • To: Wei Chen <wei.chen@xxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 27 Sep 2022 09:37: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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=eHU4h0ZZTwlKDYTi2tVdKM39Nq25dJ6x/TLnolSi+6U=; b=fafalCZkb7JNk7rbfvJ133B2aO/+0SMZLhEhnALMmPAXQKGi7A74fts0ctOjrf1Vmxoo/cBJFdsMIR/wLd1+JbJ3Ew/mxtZ9eD20l4mKF7baX/sgcTyMxVFzvDi1AX6uLGea5+b9Apy0TNPFwUfXA1x2VTVAspCFBKsbygB/cPtNvn+UoQPEEYl5LJThBa8VSpdZxec3PPTDsp1bvkHngmiRFaO7YW65muFSiPVm9PswiXjZNfZ46VEmmW2EH6bj6zHhKpoPb2Su2LENjNvacYc2533tqK7o1CPKPcwUvAYP63estINOfQaeJ8rJKua6Z8xUIFSijzPNNpdbTcC2rA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DqkMELclt0njwv8ap4vHRHf8iAviIFIaGYU4MEvCmzksEo4JDu5hOxhOJ/3UG/TyiTSvnhScg4Dzb9K0KJXI7uYrQI2NjO1E95F3oZ3BCGeX55keoP8KfYSA7NWQAfJekL15CmVN0fRy264A3hr6je2zAwnTphBEPSKIKIIi/0SsSrXRwWaFi0YQkZ631AJ2yMrx5buKMuKrAelt75Veg1zN5knHf/rWzPHvjArPAf6D5RTdtivL08BC9YXkiJJTkpvGPl1evRKIuDtTZXw6cT299q+mmsrklLLbY17wdtyr4tm5/93FCDJmRwkafb15BwySulomEGRqJqj+TvLxvg==
  • 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>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Tue, 27 Sep 2022 07:37:34 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 20.09.2022 11:12, Wei Chen wrote:
> --- a/xen/arch/x86/numa.c
> +++ b/xen/arch/x86/numa.c
> @@ -50,9 +50,28 @@ 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;

When making the v5 changes, did you go over the results to check they are
actually consistent? I'm afraid they still aren't, because of the line
above: Here we disable NUMA, but that doesn't mean there's broken firmware.
Therefore I guess I need to ask for another round of renaming of the two
helper functions; I'm sorry for that. What you introduce ...

> +        return 0;
> +    }
> +#endif
> +
> +    return -EINVAL;
> +}
> +
> +bool arch_numa_broken(void)
> +{
> +    return acpi_numa < 0;
> +}

... here wants to be arch_numa_disabled(), whereas the function currently
named this way (in patch 5) wants to be e.g. arch_numa_unavailable() (or,
using inverted sense, arch_numa_available()). Of course I'll be happy to
see other naming suggestions for both functions, as long as they reflect
the respective purposes.

Alternatively, to retain the current naming, the assignments to acpi_numa
would need revising. But I think that would be the more fragile approach.

Jan



 


Rackspace

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