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

Re: [PATCH v3 2/9] xen/arm: add cache coloring initialization for domains


  • To: Julien Grall <julien@xxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 23 Nov 2022 10:48:39 +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=gNau7kEw/1JZlPoPq7/ahtZEnJsjIHP0Aq2EgbodHO4=; b=Y7CvWcMs0rGSsS9Lm9mBiCaFbHlNeT85tulnxSmHEgG0SQzgQrxYAOHWF2peJZOXGd3caMNpl+Nnuf+zZOJV5jossKF7aXJ5cnusECdXlVC7xRjJbMVT2OpWvJsUZdceG9QgWShK+lV8COLt3kdmT3OW8bY05phZCIwDBpCPwZYmZNnwCMK/jO45wEYOT7TwUe69DJiQKNyvN/CdPYjOjc4UG7+mzBzL7CinMPnVVSMFjzOIenZhoTNMbDZRy0JF1Q3ZjPi8GkZ5NTWtFZUAv05k1Tg/qTogbCOWzCmRBL67Ko3NN8cGOhPg8CVlPatUMg3LVpraX3PSpixSb9ywDQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GEKlvSeNiuDLfEhIIKgwYaTrV0AjDn2/n0pn9dSGyhhslxBVvyRLRYLtZSpdlbr98uQevJCL13KgZsijJfW1bk4Olmm6OzNf/ZE+aO9xINRAt+vPvN2Jyea833Wnb3k9z85xlgaEAJ0fY1IJz3tvh1QtY672aoAmg1oYnt5RWfwcGymCr9C0MDJYRUFpYdsJFatvmcOoHB2+NRod6UZCgeUlzX5g4XHJjQsULg+1QKeHZIhLMZOqEP+9/6PAONAQneJgwflTWeQLmjBWkLJXL+oVoQv9qSTET7pDVSCyaQicTfuxc0fQRzqkxkC6C9kybU0eUNJvJcnzKLZ24M52QQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: marco.solieri@xxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, andrea.bastoni@xxxxxxxxxxxxxxx, lucmiccio@xxxxxxxxx, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Marco Solieri <marco.solieri@xxxxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Carlo Nonato <carlo.nonato@xxxxxxxxxxxxxxx>
  • Delivery-date: Wed, 23 Nov 2022 09:49:18 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 23.11.2022 10:41, Jan Beulich wrote:
> On 22.11.2022 21:25, Julien Grall wrote:
>> On 21/11/2022 16:40, Jan Beulich wrote:
>>> On 21.11.2022 17:23, Carlo Nonato wrote:
>>>> This would be really good. The only problem I can see is the p2m allocation
>>>> which is done during domain creation. With the current set of patches it
>>>> results in a "Failed to allocate P2M pages" since we want to have p2m 
>>>> tables
>>>> allocated with the same color of the domain and a null page is returned
>>>> because we have no colors.
>>>
>>> Hmm, I see. It would seem to me that this p2m init really is happening
>>> too early. Ideally domain_create would merely mean creating a largely
>>> empty container, with stuff being populated subsequently as necessary.
>>
>> The vGIC is not optional. So to me it sounds wrong to defer the decision 
>> to after the domain is created.
>>
>> It is not clear to me how you would check that mandatory components have 
>> been properly initialized.
> 
> There could be final checking right before unpausing a domain for the
> first time.
> 
>>> But I guess this is too much of a re-work to be done in the context
>>> here, plus of course I may be overlooking something which actually
>>> makes it necessary for domain creation to be structured the way it is
>>> right now. (Imo the reason for the early minimal population of the p2m,
>>> added only quite recently, wasn't a good one, and the vGIC init would
>>> better be deferred. Yet once again I may lack details on why that's not
>>> possible.)
>>
>> See above for the theoritical part. For the practice part, we need to 
>> know the vGIC version at domain creation because it impact the maximum 
>> of vCPU we can expose.
> 
> Sure - I didn't suggest to leave that information out of domain_create.
> 
>> It is also not very clear where this could be initialized. Are you 
>> suggesting to add an extra mandatory hypercall? FAOD, I don't think 
>> p2m_set_allocation() would be the right place.
> 
> I agree with the latter - that would at best be a bodge. And yes, I was
> thinking of having a separate domctl for that purpose.

The expand further: I think setvnumainfo would also better be issued
before _any_ memory allocations for a domain. And I view vNUMA data as
kind of comparable to the coloring data here.

Jan



 


Rackspace

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