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

RE: [PATCH v3 5/6] xen/arm: unpopulate memory when domain is static


  • To: Stefano Stabellini <sstabellini@xxxxxxxxxx>, "julien@xxxxxxx" <julien@xxxxxxx>
  • From: Penny Zheng <Penny.Zheng@xxxxxxx>
  • Date: Thu, 28 Apr 2022 03:09:39 +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=YgnqZybNVy3cW5Sb/DOu5q87BXbgnXw56tW293dCPME=; b=lmkyU5PTNQ1+Xxycsccg6tbl6LguZ2DdMspXywPCzxJO33kblNMaumqLPdVmzGzTehm+2Vo+71WvJ+Z21bIHUfI/5TkfaI2JeqEQnSf/ZbSoJ/G8ZUod4p6yEEmoSACvBlyLIvfDEmP56aqOfIVKGXvCSgCWPcB1mWosrnkLTiq7fVrfDrH2mTMJ/ccNiSPymLmN3pmpouv5z2rJP0zTbLxZRB71eCRZDLnmWLCzxY+Rcav9xPJhcZCzh6XHJXe5B9+5Ytkqhy4/88kXsEDEPz//TGwHYOiQZvebYQuYkO221vsPrseIi7NMlSohVh2TUeogtaaXQzAVg/28oWp3GA==
  • 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=YgnqZybNVy3cW5Sb/DOu5q87BXbgnXw56tW293dCPME=; b=c7XKCafVMh3K60HPaM1SWKxw3HnJm0DiW47wqHgplLg2gAZiKPbcufaKDAKw5OdQJqO2B69uLbcEkl8FlkhbdA1af8XQVIIrqDhenz5BHCpAuihr16y5d/djLdOdVg90t4VihBwezkub0HQgo/5DDDkl/ESEKU9MaIvUtkEld0ItosXYttqpGA7BzhNlVU76ihcyaMER+fKAI2IvaaDe3kQvnHW8Huc5deD8GoaoBebnOfe+DscRkz2e4MS2KePfxfgbBsNJ9/iDUwobyrM+YsKI/pLyYldLaBLI+jEzId0jWdYIlU9uUy6eaZRYeIR1WZx3uhrnhq+owXri5HIPQg==
  • Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=f6JVItza79fDmpaIW/KjZs1fhKyLzRn3FDnwFTbY2sWoquzF02w6bgLtAPFA352uAUeXW7EhBLomV/h4oU2lLAUrZsxlWRznboiv4JrJ+bwmQOCBedYjl6w3cFmQOyS8u3Qz+a8pWHLM/vptvQ/ak9Fp1LyJ3whaFF1gY0ZXfYOyN7VLYNkqoj2qE0kau8Vj1LF/gKhy2v1BCajpFVW4Uldt2XjYYumj7ZcBOIcTSlhfHQJB3bcmv91gkxbsoWUWQ3GicmlDQOMWE50mNyiTVPaH22u2ap1l+wbr0ULUMn8UyTNI2K5ZnDF6BR1webyS4HrETpkrWo39oN9UFYuvGQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RMNOjnogKfj+JgFuxZfdE31w1bu1jlfX7wSYOe/8AFY138pOuySBoUfA1+ANFT8N7UfFWdZFadFLE8KPs003DPnaPyu9mOyM2cHc/aileGeyGTLff/5bi5J+DRmP8LSnZNntM+pskpTnJqdzF4WbRYBQnXNdf22KN/i/WAwfh7EuhkunKdD3UJQfMtzcXZcs6brp3KBtTPCDUY8/VqpPYIKWH0oDPalzsvUr7p477lO15vzEdquPQeGIqyweC5muCybAi+Iw7KMKooaf/QrxMP860I/HkFssy6j+5A//0PICGctc5+6F5bi2EI41ILxGDdeCEviTBNS83wsce+WRqw==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Wei Chen <Wei.Chen@xxxxxxx>, Henry Wang <Henry.Wang@xxxxxxx>, 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, 28 Apr 2022 03:10:00 +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: AQHYWhk9pvmpyYf9yk6PCG0TATWN+q0DifWAgAAAvZCAAALDgIAAAKBggADK+ACAAEzRYA==
  • Thread-topic: [PATCH v3 5/6] xen/arm: unpopulate memory when domain is static

Hi 

> -----Original Message-----
> From: Stefano Stabellini <sstabellini@xxxxxxxxxx>
> Sent: Thursday, April 28, 2022 6:32 AM
> To: Penny Zheng <Penny.Zheng@xxxxxxx>
> Cc: Julien Grall <julien@xxxxxxx>; xen-devel@xxxxxxxxxxxxxxxxxxxx; Wei Chen
> <Wei.Chen@xxxxxxx>; Henry Wang <Henry.Wang@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 v3 5/6] xen/arm: unpopulate memory when domain is
> static
> 
> On Wed, 27 Apr 2022, Penny Zheng wrote:
> > > Hi Penny,
> > >
> > > On 27/04/2022 11:19, Penny Zheng wrote:
> > > >>> +/*
> > > >>> + * Put free pages on the resv page list after having taken them
> > > >>> + * off the "normal" page list, when pages from static memory
> > > >>> +*/ #ifdef CONFIG_STATIC_MEMORY
> > > >>> +#define arch_free_heap_page(d, pg) ({                   \
> > > >>> +    page_list_del(pg, page_to_list(d, pg));             \
> > > >>> +    if ( (pg)->count_info & PGC_reserved )              \
> > > >>> +        page_list_add_tail(pg, &(d)->resv_page_list);   \
> > > >>> +})
> > > >>> +#endif
> > > >>
> > > >> I am a bit puzzled how this is meant to work.
> > > >>
> > > >> Looking at the code, arch_free_heap_page() will be called from
> > > >> free_domheap_pages(). If I am not mistaken, reserved pages are
> > > >> not considered as xen heap pages, so we would go in the else
> > > >> which will end up to call free_heap_pages().
> > > >>
> > > >> free_heap_pages() will end up to add the page in the heap
> > > >> allocator and corrupt the d->resv_page_list because there are only one
> link list.
> > > >>
> > > >> What did I miss?
> > > >>
> > > >
> > > > In my first commit "do not free reserved memory into heap", I've
> > > > changed the behavior for reserved pages in free_heap_pages()
> > > > +    if ( pg->count_info & PGC_reserved )that
> > > > +        /* Reserved page shall not go back to the heap. */
> > > > +        return free_staticmem_pages(pg, 1UL << order,
> > > > + need_scrub);
> > > > +
> > >
> > > Hmmm... somehow this e-mail is neither in my inbox nor in the
> > > archives on lore.kernel.org.
> > >
> >
> > Oh.... I just got email from tessian that they held my first commit,
> > and needed my confirmation to send. So sorry about that!!!
> >
> > I'll re-send my first commit ASAP.
> 
> Just FYI I still cannot see the first patch anywhere in my inbox

So sorry about the mess again...
I've resend it just now, PLZ check 
https://patchwork.kernel.org/project/xen-devel/patch/20220428030127.998670-1-Penny.Zheng@xxxxxxx/
 



 


Rackspace

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