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

RE: [PATCH 08/10] xen/arm: introduce reserved_page_list


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Penny Zheng <Penny.Zheng@xxxxxxx>
  • Date: Tue, 18 May 2021 08:38:32 +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=5j6DHPk3Onp8iMyaDnuhLbqdzju0oLU7p9yQyO0eueU=; b=ASJPiKj9A7CfQRF2S9y5jmTjF178ldhmSDTcgU4BXQi2+gwt7ndhjwGz3bAgHQ2qH7N831plro+/252O/spV90fHZjCBW/vZyV5ecy9O52BmRgHbdt0waWBOcHQcf0Ef6+BhIWWGRMTHaLeI3vWusDdk15RTIPi9LJn60n2gRdBD+VdOtsYsR7HhV9LKND6ex+o6AvGhg3tq3UvjWG1k8Yl0JEVKO2SrE8ylzXLkJSSUusO8T2syvRaUuj5dQ/T/j7XgOoY/XxQSzgA1W9jnj/l/HI7XHdHBtOmtgrn6H8nKA8YmaYILD8vPBIAg1b6MFywqVak5220F5Ju4NYeuJA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=M4+X6FceKZ8EivGW2ivCi5OMpsof/SIM1TwNcogto8LXovz75tNBFhPqf2gjnd3Z1Ld6rHc/qRFdpZd3bkdZRQkhyqrIbDYyfG/4LEED9wlBgIv7hv7D1VcvtUCur6p7EPzmcs8wVOoQj7kTE32pQf4kUenDl+eM8YA3sPEYVDads92c+GI36WcD6dHJ0RwM5++obANlOL/yLYxOkYrqM08i7K+v3b5BdcbWiB7ZvmFiNEwGBd+iv3DVH2Jj1Ss7qhcxxYifvIlAGGMpOF6cbNYFcMkHgemdxIT3um35jno5HlwB8WFCL+rz7JT0kSKePU98WiIX8RTo60K2y4bBLA==
  • Authentication-results-original: suse.com; dkim=none (message not signed) header.d=none;suse.com; 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>, "julien@xxxxxxx" <julien@xxxxxxx>
  • Delivery-date: Tue, 18 May 2021 08:39:01 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: suse.com; dkim=none (message not signed) header.d=none;suse.com; dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHXS6XFXoougD95T02cEJMQScUNQ6ro2ogAgAAQIWA=
  • Thread-topic: [PATCH 08/10] xen/arm: introduce reserved_page_list

Hi Jan

> -----Original Message-----
> From: Jan Beulich <jbeulich@xxxxxxxx>
> Sent: Tuesday, May 18, 2021 3:39 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 08/10] xen/arm: introduce reserved_page_list
> 
> On 18.05.2021 07:21, Penny Zheng wrote:
> > Since page_list under struct domain refers to linked pages as gueast
> > RAM allocated from heap, it should not include reserved pages of static
> memory.
> >
> > The number of PGC_reserved pages assigned to a domain is tracked in a
> > new 'reserved_pages' counter. Also introduce a new reserved_page_list
> > to link pages of static memory. Let page_to_list return
> > reserved_page_list, when flag is PGC_reserved.
> >
> > Later, when domain get destroyed or restarted, those new values will
> > help relinquish memory to proper place, not been given back to heap.
> >
> > Signed-off-by: Penny Zheng <penny.zheng@xxxxxxx>
> > ---
> >  xen/common/domain.c     | 1 +
> >  xen/common/page_alloc.c | 7 +++++--
> >  xen/include/xen/sched.h | 5 +++++
> >  3 files changed, 11 insertions(+), 2 deletions(-)
> 
> This contradicts the title's prefix: There's no Arm-specific change here at 
> all.
> But imo the title is correct, and the changes should be Arm-specific. There's
> no point having struct domain fields on e.g. x86 which aren't used there at 
> all.
> 

Yep, you're right.
I'll add ifdefs in the following changes.

> > --- a/xen/common/page_alloc.c
> > +++ b/xen/common/page_alloc.c
> > @@ -2410,7 +2410,7 @@ int assign_pages(
> >
> >          for ( i = 0; i < nr_pfns; i++ )
> >          {
> > -            ASSERT(!(pg[i].count_info & ~PGC_extra));
> > +            ASSERT(!(pg[i].count_info & ~(PGC_extra |
> > + PGC_reserved)));
> >              if ( pg[i].count_info & PGC_extra )
> >                  extra_pages++;
> >          }
> > @@ -2439,6 +2439,9 @@ int assign_pages(
> >          }
> >      }
> >
> > +    if ( pg[0].count_info & PGC_reserved )
> > +        d->reserved_pages += nr_pfns;
> 
> I guess this again will fail to build on x86.
> 
> > @@ -588,6 +590,9 @@ static inline struct page_list_head *page_to_list(
> >      if ( pg->count_info & PGC_extra )
> >          return &d->extra_page_list;
> >
> > +    if ( pg->count_info & PGC_reserved )
> > +        return &d->reserved_page_list;
> 
> Same here.
> 
> Jan

Thanks
Penny

 


Rackspace

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