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

RE: [PATCH V3 08/10] xen/arm: introduce acquire_staticmem_pages and acquire_domstatic_pages


  • To: Julien Grall <julien@xxxxxxx>
  • From: Penny Zheng <Penny.Zheng@xxxxxxx>
  • Date: Wed, 21 Jul 2021 07:52:27 +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=iY7ZxzNpNzB8rIsM7J11jX6/cP1VaupkN8hcmc02UxM=; b=j1pojPEVVvr8ublDUWEuXHfgRFcrKkrZZGtVInXBq1I57aFcLceYNoUUzAT3wbF8oGUQjUad+Hzp0TQUu3LcfmdE70IWKlPWJc2KMuQcrsqj2nCZjM8Yx5Q73rqgIytSBGDyXqkCH90DCZ3tjjtmaCX0gxdr93Wyz5HPDDwCimi5xaJZTsxwiuIzToj74cnYdGWsksSyrgHTqw183GrOh4zxAR27Tmwoux0MxUKTRD/ggVSQA6PnuGh4qqJCfBTUiXtMxlur5UahsGTsn/3yz48By2XlmH0RskV4xK6QHbpkSzaRXOBLluffvCfq3SG4VD2aiEfLHus5tq9+h+jhaQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dslnP5mN0uOcePF0+C81KhV1CXsG8WKTAuaCvJdVar9s4OsTxjApeEQSXqTd3OLGxVctpeOD/QSmvAATHmvA7BjTMw0mxKgX8OShlaYbShk2BfRoPSMq3BKisJyetQotYVJW3Iu99s8w6T/Q9Lji62bFeE5nRq/PqJYC0Vhsil3UskABTj7bYQv9M8hAX6LQPoXIvUYhSyK2M39g5rHMwqm2mnh+DYVVjviM0FoXeaNDKfxGLBkpxijMYt8tqf4Gi/MBbG7oBMy3whdae4+uUFhK3RK88mGxK8xKwa1UiSpPRTflvuGry9Oe/j4UQv97D08V8eIfq9wRYq/C2ec1ZA==
  • 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>, Jan Beulich <jbeulich@xxxxxxxx>
  • Delivery-date: Wed, 21 Jul 2021 07:52:53 +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: AQHXeTjq+y3FueirQkOYkBcn9nCNvqtKDb8AgAAJhwCAAvzIwA==
  • Thread-topic: [PATCH V3 08/10] xen/arm: introduce acquire_staticmem_pages and acquire_domstatic_pages

Hi Julien 

> -----Original Message-----
> From: Julien Grall <julien@xxxxxxx>
> Sent: Monday, July 19, 2021 6:00 PM
> To: Jan Beulich <jbeulich@xxxxxxxx>; Penny Zheng <Penny.Zheng@xxxxxxx>
> Cc: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>; Wei Chen
> <Wei.Chen@xxxxxxx>; nd <nd@xxxxxxx>; xen-devel@xxxxxxxxxxxxxxxxxxxx;
> sstabellini@xxxxxxxxxx
> Subject: Re: [PATCH V3 08/10] xen/arm: introduce acquire_staticmem_pages
> and acquire_domstatic_pages
> 
> Hi Jan,
> 
> On 19/07/2021 10:26, Jan Beulich wrote:
> > On 15.07.2021 07:18, Penny Zheng wrote:
> >> @@ -1065,6 +1069,73 @@ static struct page_info *alloc_heap_pages(
> >>       return pg;
> >>   }
> >>
> >> +#ifdef CONFIG_STATIC_MEMORY
> >> +/*
> >> + * Acquire nr_mfns contiguous reserved pages, starting at #smfn, of
> >> + * static memory.
> >> + */
> >> +static struct page_info *acquire_staticmem_pages(unsigned long nr_mfns,
> >> +                                                 mfn_t smfn,
> >> +                                                 unsigned int
> >> +memflags)
> >
> > This and the other function not being __init, and there neither being
> > any caller nor any freeing, a question is whether __init wants adding;
> > patch 10 suggests so. The lack of freeing in particular means that
> > domains created using static memory won't be restartable, requiring a
> > host reboot instead.
> 
> I am open to request an host reboot in case of an issue. Although, it would be
> good to have code in place for that.
> 
> Regardless the reboot part, I would still expect the domain to balloon in/out
> memory. This is pretty broken today because Xen would end up to give the
> memory to the heap allocator and the next allocation would be through the
> heap allocate.
> 
> For runtime "free/allocate", we may want to follow the same behavior as
> direct-mapped domain (i.e. GFN == MFN): the page will not be given back to
> any allocator and we only check if the page belongs to the domain on
> allocation.
> 
> So adding __init for acquire_staticmem_pages() is probably fine.
> 
> On a side node, on v2, I have requested to keep track of the list of missing
> pieces. @Penny, where can I find the list?
> 

Oh, sorry... 

I thought you were requesting a new mail list issue to track all missing pieces 
in ARM...
And a second though here, you shall only mean the missing pieces for this patch 
serie.

I'll do a quick sum-up here and put in the Patch v4 cover letter:

TODO:
- reboot domain on static allocation.
- All memory-ops(hypercalls) regarding domain on static allocation to balloon 
in/out memory
- asynchronously scrubbing PGC_reserved pages
- consider domain on static allocation on NUMA-support scenario

> 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®.