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

RE: [PATCH v6 7/9] xen/arm: unpopulate memory when domain is static


  • To: Julien Grall <julien@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Penny Zheng <Penny.Zheng@xxxxxxx>
  • Date: Thu, 9 Jun 2022 03:23:40 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com])
  • 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=2; 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=nUoK2vfRlr5hPn0qnnmWHphQJK115+ItmFJpMWV1aGg=; b=P0SakBKsGxTVP3EjeIz84yRYiKb8O/ochXITWkNxjaZzZM/ZLReAR7zudMA0zncjmLtHMDcs0qEZLpYzFwdjkFhHcHmeqYGRmVGpFr471FhVD5wXNDHf/Us8IPzwxaEm/xM0bZGgdjsiC9nb/0AEaEkWamvpJsHBdf3M5cLUujm29GwjHT+Fq5h3llxapytwWbZkP4V5DHy6r5IYiIJ1rELa6M1hOENi/0FEYHWnlFYG6060LQBj6Z+EZZMnuNQdy2CMwDpVNyEHsze55deV/UO5JPBiMXdVLn+1vuZyR8rwDVhnT44y45B+2LaEkLf8914w0UPzZ75iNtTlSXnEmg==
  • 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=nUoK2vfRlr5hPn0qnnmWHphQJK115+ItmFJpMWV1aGg=; b=h/SsVdCKYYqhn9jHe+xQ40/SW2TZ3JUqIkNxvxfG3DmFk3fKcY6U20KeLwHJoLloFe4oTTxs7RfHcWIQKmTyaiHxKQRKogde9saxzwjv5P7CYY+1pXVa69dsIra7C6g7VoKMhzCsrdUDBClbXSQD3ZoB64WOesgiqoSyaCCdA1VOWZrP/rm+duirUgvtPn7I+fdjP9g6qVroZU0pma7FvAQ/Akete6P0xU2WNOfK8IkOWanBMyv7UgmqEJID/+VuD7+bNQ72KGMsvo/rzwIAgJ7Y2CHwOMihVbRufhtEY1i5DSNL+Nqsx/Gv07LQ8CPMXgephb/8gVly4g98Ae/Fgw==
  • Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=CEz+UchdGAP2t+h6D2FWuzyH1LAORqtrJiK0EGqpPtyvNz4nWzo8qAAeHnLGDJoB0KUudKWik4j/fJxIIILP/mvqpnH2hepfZFLomB1tqxDy5VP3VL1MqqE3IF+M/jygw5stvKO2MtSlmWa3cci0/yFsF0eWdQZxt1vSmh6ui5lIERhKICqOTjB09wgTUMX2IWg/YqGGuXwupEVd9bzfeMoQT+Q1bs+XKpScGfPn9GEYWEXtzvw6KqwPxdSUO197JnHKNl78l4upPQP9+W1WgaxJTw1qxiSVRGklp4rzr66bhsD3BvRbCTzwcsUAKpJ2OifgMxMNNzeBtuUzndSDDw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZH+qxWGcyHpcxPGtwA+t8FkMNnAPWoplI9BkeG9Pbk70jIZ7iGT4q/jCBHupOuSePfscxYL527ZNPHZlerou47NB5sxHOINlZc/odDVVmiPw+7znvi+uF2janr2kfr11UJaKH2cNl6NabfSIapt8lHi2agG+pni5oBT7y0ERnmS907Q3g69rOsv20kauyAFF2FQMl/YuAvZRZH8SAUajxu0CfduBUfBCCMLBK2uabHI/xrRozRZTOfHBJCNN8fqOr9vCn8D4wdLOPuFNkXqjkvoDwL4/brZ6kdp4UUJexRLr30M6QFQ8SgL60lAEPfU/7Bhqxi7kIBopO4sFKc67rA==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Wei Chen <Wei.Chen@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Thu, 09 Jun 2022 03:24:20 +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: AQHYekCZzsveZhnerUWxbO0gDoOu8a1DqumAgAK/JFA=
  • Thread-topic: [PATCH v6 7/9] xen/arm: unpopulate memory when domain is static

Hi Julien

> -----Original Message-----
> From: Julien Grall <julien@xxxxxxx>
> Sent: Tuesday, June 7, 2022 5:20 PM
> To: Penny Zheng <Penny.Zheng@xxxxxxx>; xen-devel@xxxxxxxxxxxxxxxxxxxx
> Cc: Wei Chen <Wei.Chen@xxxxxxx>; Stefano Stabellini
> <sstabellini@xxxxxxxxxx>; Bertrand Marquis <Bertrand.Marquis@xxxxxxx>;
> Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>; Andrew Cooper
> <andrew.cooper3@xxxxxxxxxx>; George Dunlap <george.dunlap@xxxxxxxxxx>;
> Jan Beulich <jbeulich@xxxxxxxx>; Wei Liu <wl@xxxxxxx>
> Subject: Re: [PATCH v6 7/9] xen/arm: unpopulate memory when domain is
> static
> 
> Hi Penny,
> 
> On 07/06/2022 08:30, Penny Zheng wrote:
> > Today when a domain unpopulates the memory on runtime, they will
> > always hand the memory back to the heap allocator. And it will be a
> > problem if domain is static.
> >
> > Pages as guest RAM for static domain shall be reserved to only this
> > domain and not be used for any other purposes, so they shall never go
> > back to heap allocator.
> >
> > This commit puts reserved pages on the new list resv_page_list only
> > after having taken them off the "normal" list, when the last ref dropped.
> >
> > Signed-off-by: Penny Zheng <penny.zheng@xxxxxxx>
> > Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
> > ---
> > v6 changes:
> > - refine in-code comment
> > - move PGC_static !CONFIG_STATIC_MEMORY definition to common header
> 
> I don't understand why this change is necessary for this patch. AFAICT, all 
> the
> users of PGC_static will be protected by #ifdef CONFIG_STATIC_MEMORY and
> therefore PGC_static should always be defined.
> 

True, I notice that arch_free_heap_page has already been guarded with
#ifdef CONFIG_STATIC_MEMORY. I'll revert the change.

> Cheers,
> 
> --
> Julien Grall

 


Rackspace

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