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

Re: [RFC PATCH 0/2] Boot time cpupools


  • To: Julien Grall <julien@xxxxxxx>
  • From: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
  • Date: Wed, 17 Nov 2021 11:16:10 +0000
  • Accept-language: en-GB, en-US
  • 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=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=LMFl5gcudJV3Vce7N08dDnYf7AE8Pe3mU55lTGwcpuY=; b=gBLokkPrdQbbun+2cO0bSO60omllBD8qBDzUitj0vv7m1F6WDszBK+YMF0LyoCuchagEmXTAgtxC5BpddOnemoGNkzJ8fVcjTB4U+uc2zBclWvqtqKN9WriKCGKceT5y282o7zAWc35dWxvqE4Nwwu02nK42IZraVlmpuyq5rzzT6ZUTD12kMsJynP5+SC02qwesDsmiB7LQjUr3xi+/KBdH9FAEHi+rv12PSH+Pfz6O+SV0u9DJyMk7RUwlZ7/8wvyJeiU3wAatzlqKqtTJJAsJU72+jLFBu4xTfRhYnCG5nDAXg9EmWE194wV6g1x88M07GIGFxvFRYSFIhi51pw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=g+fJOWOorM50CKQkJu7Dkj6UwsaJR2IIv6lFOAiNW+SS877u6lWLLl0Bjbi8tj1iVyFFKdqUD6n4wynnRD87lyzQ0OJbqhmaa2986RH5p6dZ0WYUeeuoJ5gkvQGbXYO8AVZ+r+eE6B6gziNNK3GB+G5Ziy2Mlql6jkeDzWzQAAJra7F4UMx+2LX+UFLGjq8zq4ghbH5AshvhsyQAu8tQagyjxL6Z6mQB/f003RiO6GZHSR0Xx+QTQvJYmkK14ZQwxAY3UuWbmcCaqdX5I0ZoPM+UyQXZxwB3D6zTkwTbevoISRNxY8UcpwrwPGdX5a6d5evat47YrzVh/oWkYXqMJg==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Luca Fancellu <Luca.Fancellu@xxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Wei Chen <Wei.Chen@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Wei Liu <wl@xxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Dario Faggioli <dfaggioli@xxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • Delivery-date: Wed, 17 Nov 2021 11:16:48 +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: AQHX25mOHH0z58pAdkqC6AziO7R1GqwHg+AAgAAN94A=
  • Thread-topic: [RFC PATCH 0/2] Boot time cpupools

Hi Julien,

> On 17 Nov 2021, at 10:26, Julien Grall <julien@xxxxxxx> wrote:
> 
> Hi Luca,
> 
> On 17/11/2021 09:57, Luca Fancellu wrote:
>> Currently Xen creates a default cpupool0 that contains all the cpu brought up
>> during boot and it assumes that the platform has only one kind of CPU.
>> This assumption does not hold on big.LITTLE platform, but putting different
>> type of CPU in the same cpupool can result in instability and security issues
>> for the domains running on the pool.
> 
> I agree that you can't move a LITTLE vCPU to a big pCPU. However...
> 
>> For this reason this serie introduces an architecture specific way to create
>> different cpupool at boot time, this is particularly useful on ARM big.LITTLE
>> platform where there might be the need to have different cpupools for each 
>> type
>> of core, but also systems using NUMA can have different cpu pool for each 
>> node.
> 
> ... from my understanding, all the vCPUs of a domain have to be in the same 
> cpupool. So with this approach it is not possible:
>   1) to have a mix of LITTLE and big vCPUs in the domain
>   2) to create a domain spanning across two NUMA nodes
> 
> So I think we need to make sure that any solutions we go through will not 
> prevent us to implement those setups.

The point of this patch is to make all cores available without breaking the 
current behaviour of existing system.

Someone not using cpupool will keep running on the same cores as before.
Someone wanting to use the other cores could assign a guest to the other(s) 
cpupool (big.LITTLE is just an example with 2 but there are now cores with 3 
types of cores).
Someone wanting to build something different can now create new cpupools in 
Dom0 and assign the cores they want to is to build a guest having access to 
different types of cores.

The point here is just to make the “other” cores accessible and park them in 
cpupools so that current behaviour is not changed.

> 
> I can see two options here:
>  1) Allowing a domain vCPUs to be on a different cpupool
>  2) Introducing CPU class (see [1])
> 
> I can't remember why Dario suggested 2) rather than 1) in the past. @Dario, 
> do you remember it?

I think 1) is definitely interesting and something that could be looked at in 
the future.

This serie just aims at making all cores available without breaking backward 
compatibility which is a good improvement but does not contradict the 2 options 
you are suggesting.

Cheers
Bertrand

> 
> Cheers,
> 
> [1] https://lore.kernel.org/xen-devel/1481135379.3445.142.camel@xxxxxxxxxx/
> 
>> To test this serie, the hmp_unsafe Xen boot argument is passed to allow Xen
>> starting different CPUs from the boot core.
>> Luca Fancellu (2):
>>   xen/cpupool: Create different cpupools at boot time
>>   tools/cpupools: Give a name to unnamed cpupools
>>  tools/libs/light/libxl_utils.c | 13 ++++--
>>  xen/arch/arm/Kconfig           | 15 ++++++
>>  xen/arch/arm/Makefile          |  1 +
>>  xen/arch/arm/cpupool.c         | 84 ++++++++++++++++++++++++++++++++++
>>  xen/common/sched/cpupool.c     |  5 +-
>>  xen/include/xen/cpupool.h      | 30 ++++++++++++
>>  6 files changed, 142 insertions(+), 6 deletions(-)
>>  create mode 100644 xen/arch/arm/cpupool.c
>>  create mode 100644 xen/include/xen/cpupool.h
> 
> -- 
> Julien Grall


 


Rackspace

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