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

Re: [PATCH v2 4/6] xen/cpupool: Create different cpupools at boot time


  • To: Juergen Gross <jgross@xxxxxxxx>, Luca Fancellu <Luca.Fancellu@xxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Fri, 11 Mar 2022 10:46:47 +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=sadzFknVB08MeOjW+HL4UeJqEuTAHjGcpcSpPOCsao8=; b=dEW20dGzS8hXTR4LcymUlUnEqVrsEyWcKuOBmnu5p6BHn8NasWj7CswQ+dgGCXO3R/XqxDpTpwPZQEUkjMT8FnZ4KFtGSdgvbftBnm2WQHc+hyqKegV/idiKoWWx1Eq2IZS2fLpUQimAAXjcdgjl4SpAu8zEe/jU8E8a+KS7KbFHsNFumMO6nXMC3p3Ntd4rlGJQOacaHD9PJ+jJbvQbDvEPh8APN3tt16QwYS4RJQHjujXePpV8xu8lHSU9eZ1mlvqFqnoNRQiHyQIzrmNz2H/IA1UXVcfB94L9KgKoRC+7huK1WQRr56afTm3BIbYWq7/0zVLermEeYKLpqT9D5g==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IZMMmcigDDsov/Wc97RRVrJ79I0Mt88pUOHw4LTvqKpozJtFBHYkhPo2T13DF+/XhoZigBNF+vbyKuNc+3tEq1ZGHtqnsR7j2njC//FqegzpXhtU1YsevP2ZShtnjJv/UAgtqN0/dAXv/DfoFL/rVOURbOvNyACvJww/naB+2ayun6biUVyeRD5MYTxw6n4c+B/WYK4y25Fzg8zdmEPdgxgSPhkTb4xomOUWq0/dKyZSwVz0hgKCG3Xq8iXF5/D27PmeP5FUo6YDPJrbH45HsfGAfDQ0r2pn31pTDvx7yeyZcxROd8S97oYqWZq3/ydgaHIxUzyMCIGQ7DWz8KIsLA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Wei Chen <Wei.Chen@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>, Dario Faggioli <dfaggioli@xxxxxxxx>
  • Delivery-date: Fri, 11 Mar 2022 09:47:05 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 11.03.2022 10:29, Juergen Gross wrote:
> On 11.03.22 09:56, Luca Fancellu wrote:
>>> On 11 Mar 2022, at 08:09, Juergen Gross <jgross@xxxxxxxx> wrote:
>>> On 10.03.22 18:10, Luca Fancellu wrote:
>>>> --- /dev/null
>>>> +++ b/xen/common/boot_cpupools.c
>>>> @@ -0,0 +1,212 @@
>>>> +/* SPDX-License-Identifier: GPL-2.0 */
>>>> +/*
>>>> + * xen/common/boot_cpupools.c
>>>> + *
>>>> + * Code to create cpupools at boot time for arm architecture.
>>>
>>> Please drop the arm reference here.
>>>
>>>> + *
>>>> + * Copyright (C) 2022 Arm Ltd.
>>>> + */
>>>> +
>>>> +#include <xen/sched.h>
>>>> +
>>>> +#define BTCPUPOOLS_DT_NODE_NO_REG     (-1)
>>>> +#define BTCPUPOOLS_DT_NODE_NO_LOG_CPU (-2)
>>>
>>> Move those inside the #ifdef below, please
>>>
>>>> +
>>>> +struct pool_map {
>>>> +    int pool_id;
>>>> +    int sched_id;
>>>> +    struct cpupool *pool;
>>>> +};
>>>> +
>>>> +static struct pool_map __initdata pool_cpu_map[NR_CPUS] =
>>>> +    { [0 ... NR_CPUS-1] = {.pool_id = -1, .sched_id = -1, .pool = NULL} };
>>>> +static unsigned int __initdata next_pool_id;
>>>> +
>>>> +#ifdef CONFIG_ARM
>>>
>>> Shouldn't this be CONFIG_HAS_DEVICE_TREE?
>>
>> Yes, the only problem is that in get_logical_cpu_from_hw_id I use the arm 
>> specific
>> cpu_logical_map(…), so what do you think it’s the better way here?
>> Do you think I should have everything under CONFIG_HAS_DEVICE_TREE
>> and get_logical_cpu_from_hw_id under CONFIG_ARM like in this way below?
> 
> Hmm, what is the hwid used for on Arm? I guess this could be similar
> to the x86 acpi-id?

Since there's going to be only one of DT or ACPI, if anything this could
be the APIC ID and then ...

> So I'd rather put get_logical_cpu_from_hw_id() into Arm specific code
> and add a related x86 function to x86 code. Depending on the answer to
> above question this could either be get_cpu_id(), or maybe an identity
> function.

... a lookup loop over x86_cpu_to_apicid[] (I thought we had a function
doing so, but right now I can't find one).

Jan




 


Rackspace

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