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

RE: [PATCH 07/10] xen/arm: intruduce alloc_domstatic_pages


  • To: Julien Grall <julien@xxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>
  • From: Penny Zheng <Penny.Zheng@xxxxxxx>
  • Date: Wed, 19 May 2021 07:52:10 +0000
  • Accept-language: 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-SenderADCheck; bh=Oz/j1/U/AkMxxZ8CB/mK3KXR+dZo3nuUFYqFkmitehk=; b=WEjeunWmegZVsjmdlCIjJqB7DliDwm6GaT6QGos2wVlcOarrRUTYh5q5wwbbFuATeI9ezMAlKmn1w+wKWc6IqltG6byk14/GZeeeEPgjnlbOS4LGOZPWtIl/8WFb/mnZWTjYFU1UeAaJkngOf6f20QF8kj4lNMaLyHgjoEnDPB7MIARTBrza4FHImH3GUiciKJkUeJduCC/1RshyUF6ODXL1NHk+40ISlcqe2L0ushUbXtEu4uSe3Em2NHb3MofPiuHwrdfpBl0jZn0xtj7dIE53K5JOqrPgeXIkrAb/KM0oUV7F5SrShLJ3wVO3+ziKQZK/JkpHMrvgrh9sWjAXhw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=K3WNb1OKLzo0Urf7dyCuOTG602qvCfWfyv3jsWpIYBXCI01A9IgYBgIKxGamdpixKNn/b311AeuTScT/roJHb4o40blgrUuVqK1Ot1/PreYEQ5N1ELLcZ8muKegB1A2ZwizM6NtTfP+ItUAs9zyDEnp0169cjkmNrEoW2pYADxyqwqaCSMn2Vb8sfJIExNGP4tiE2lsYlrkKZnwLlYhhddDMz4hlsaLpRpglVqmLSVnp4NtZrHESXj8gDKQP0YKZFn1y6nH7hpLOTAgzyJzewHDikfvhlPUTaCdlUXWUaGbJWm1YHLsc3hlYoB5eS1d1sCe/qsVnHmacQjQ8WH6PSQ==
  • Authentication-results-original: xen.org; dkim=none (message not signed) header.d=none;xen.org; dmarc=none action=none header.from=arm.com;
  • Cc: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Wei Chen <Wei.Chen@xxxxxxx>, nd <nd@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "sstabellini@xxxxxxxxxx" <sstabellini@xxxxxxxxxx>
  • Delivery-date: Wed, 19 May 2021 07:52:26 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: xen.org; dkim=none (message not signed) header.d=none;xen.org; dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHXS6W/k/joZEkeaUiDjrfYH3jVEaro2ToAgAAR3sCAADv/gIABQxZg
  • Thread-topic: [PATCH 07/10] xen/arm: intruduce alloc_domstatic_pages

Hi Julien

> -----Original Message-----
> From: Julien Grall <julien@xxxxxxx>
> Sent: Tuesday, May 18, 2021 8:13 PM
> To: Penny Zheng <Penny.Zheng@xxxxxxx>; Jan Beulich <jbeulich@xxxxxxxx>
> Cc: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>; Wei Chen
> <Wei.Chen@xxxxxxx>; nd <nd@xxxxxxx>; xen-devel@xxxxxxxxxxxxxxxxxxxx;
> sstabellini@xxxxxxxxxx
> Subject: Re: [PATCH 07/10] xen/arm: intruduce alloc_domstatic_pages
> 
> Hi Penny,
> 
> On 18/05/2021 09:57, Penny Zheng wrote:
> >> -----Original Message-----
> >> From: Jan Beulich <jbeulich@xxxxxxxx>
> >> Sent: Tuesday, May 18, 2021 3:35 PM
> >> To: Penny Zheng <Penny.Zheng@xxxxxxx>
> >> Cc: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>; Wei Chen
> >> <Wei.Chen@xxxxxxx>; nd <nd@xxxxxxx>; xen-
> devel@xxxxxxxxxxxxxxxxxxxx;
> >> sstabellini@xxxxxxxxxx; julien@xxxxxxx
> >> Subject: Re: [PATCH 07/10] xen/arm: intruduce alloc_domstatic_pages
> >>
> >> On 18.05.2021 07:21, Penny Zheng wrote:
> >>> --- a/xen/common/page_alloc.c
> >>> +++ b/xen/common/page_alloc.c
> >>> @@ -2447,6 +2447,9 @@ int assign_pages(
> >>>       {
> >>>           ASSERT(page_get_owner(&pg[i]) == NULL);
> >>>           page_set_owner(&pg[i], d);
> >>> +        /* use page_set_reserved_owner to set its reserved domain owner.
> >> */
> >>> +        if ( (pg[i].count_info & PGC_reserved) )
> >>> +            page_set_reserved_owner(&pg[i], d);
> >>
> >> Now this is puzzling: What's the point of setting two owner fields to
> >> the same value? I also don't recall you having introduced
> >> page_set_reserved_owner() for x86, so how is this going to build there?
> >>
> >
> > Thanks for pointing out that it will fail on x86.
> > As for the same value, sure, I shall change it to domid_t domid to record 
> > its
> reserved owner.
> > Only domid is enough for differentiate.
> > And even when domain get rebooted, struct domain may be destroyed, but
> > domid will stays The same.
> > Major user cases for domain on static allocation are referring to the
> > whole system are static, No runtime creation.
> 
> One may want to have static memory yet doesn't care about the domid. So I
> am not in favor to restrict about the domid unless there is no other way.
> 

The user case you bring up here is that static memory pool? 

Right now, the user cases are mostly restricted to static system.
If we bring runtime allocation, `xl` here, it will add a lot more complexity. 
But if the system has static behavior, the domid is also static. 

On rebooting domain from static memory pool, it brings up more discussion, like
do we intend to give the memory back to static memory pool when rebooting,
if so, ram could be allocated from different place compared with the previous 
one.
And it kinds destroys system static behavior. 

or not giving back, just store it in global variable `struct page_info 
*[DOMID]` like the
others. 

> Cheers,
> 
> --
> Julien Grall

Cheers

Penny Zheng

 


Rackspace

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