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

RE: Discussion of Xenheap problems on AArch64


  • To: Julien Grall <julien@xxxxxxx>, "sstabellini@xxxxxxxxxx" <sstabellini@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Henry Wang <Henry.Wang@xxxxxxx>
  • Date: Mon, 17 May 2021 06:38:05 +0000
  • Accept-language: zh-CN, 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=IdVtVJ+9fSc+lGKAXBgShaRNGr2ufhmlajbFBoKDwZA=; b=lxsC34kjeIDwQE00tM3unUdU2W+EpkU8lnO2ujJKIveVHKOOUZA0PVI2IoOTKLW2OKNP/SyiAc6sXOKSSGxxGOjgIRxvV8wo7hcHQjlPKuv3msY8AEBAkgRaYr5UDPCEDdk1AgpDXypDdtghl4o8t69/0cl3DXBLZ5u8NH/cuMwe0J9tmx7WxVnldNZwtqZXQN7cXa9ZxHMxSR/ud35LfkqTHovd09NSbe1XECBydD+aS4xft4D0o2ibzgn+959GpdU8wWF8HCfeB+LA8hWAZbp0LY8d8AR5FpFfAkIWApmMDYsBVU4+bGoQ4uRVeyeQuM9B34VHCt18d1A6E5NBUA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TM5Mv1nLuPDOyq99HJQHCH5uzzG/SwS2I/ZiV4G5uyijcyZT+WLJRlJQI8PPtJyKh7zK+LPtRfuTHRyGKbAVBqspYTtB+hhhKaefa2LbDu9vh1PIaWlXPvYdYQBmr+uoPVO/bTMBX7hswdeKb25q39IpLpGTciVm5qU2G6djxKuGWbcQl7EbNLYxHniczzy3ChjSdSdl4zHfrRcoimxNJk+337BqjSB5tSn8ZDFGA4NWsMeZB+0u3Gxw7huv5j2h2o/qsetP4Z7d5N784mdWOqPqoUy4uDthytRD8s+5ALZ9wyq7Ud2PwtOiKhQGnYr123u5DyZfjKPByLhOzkxqTQ==
  • Authentication-results-original: xen.org; dkim=none (message not signed) header.d=none;xen.org; dmarc=none action=none header.from=arm.com;
  • Cc: Wei Chen <Wei.Chen@xxxxxxx>, Penny Zheng <Penny.Zheng@xxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
  • Delivery-date: Mon, 17 May 2021 06:38:28 +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: Adc2dyA8lkZGRqbyRiSglHolanVkwQAFhaqAAACgy/AA4CfqgABHcHyAADhcqlAABznSAAGrycWAALiGZgAAEDKF4ACJdUUAABHcYPAAVJTsgABJ8qkw
  • Thread-topic: Discussion of Xenheap problems on AArch64

> From: Julien Grall <julien@xxxxxxx>
Hi Julien,

> Hi Henry,
> 
> >>>> [...]
> 
> Ah yes, we don't have a variant with _. I thought compiled test before
> sending it :(.

No worries :)

> 
> >
> > (XEN) ----------banks=2--------
> > (XEN) ----------start=80000000--------
> > (XEN) ----------size=7F000000--------
> > (XEN) ----------start=F900000000--------
> > (XEN) ----------size=80000000--------
> > (XEN) Checking for initrd in /chosen
> > (XEN) RAM: 0000000080000000 - 00000000feffffff
> > (XEN) RAM: 000000f900000000 - 000000f97fffffff
> > (XEN)
> > (XEN) MODULE[0]: 0000000084000000 - 00000000841464c8 Xen
> > (XEN) MODULE[1]: 00000000841464c8 - 0000000084148c9b Device Tree
> > (XEN) MODULE[2]: 0000000080080000 - 0000000081080000 Kernel
> > (XEN)  RESVD[0]: 0000000080000000 - 0000000080010000
> > (XEN)
> > (XEN) Command line: noreboot dom0_mem=1024M console=dtuart
> > dtuart=serial0 bootscrub=0
> > (XEN) PFN compression on bits 21...22
> > (XEN) init_boot_pages: ps 0000000080010000 pe 0000000080080000
> 
> The size of this region is 448MB.
> 
> > (XEN) init_boot_pages: ps 0000000081080000 pe 0000000084000000
> 
> The size of this region is 47MB.
> 
> > (XEN) init_boot_pages: ps 0000000084149000 pe 00000000ff000000
> 
> The size of this region is 1966MB.
> 
> 
> > (XEN) alloc_boot_pages: nr_pfns 1 pfn_align 1
> > (XEN) alloc_boot_pages: nr_pfns 1 pfn_align 1
> > (XEN) alloc_boot_pages: nr_pfns 1 pfn_align 1
> > (XEN) init_boot_pages: ps 000000f900000000 pe 000000f980000000
> 
> The size of this region is 2048MB.
> 
> > (XEN) alloc_boot_pages: nr_pfns 909312 pfn_align 8192
> 
> This is asking for 3552MB of contiguous memory which cannot be
> accommodated. In any case, this is quite a large region to ask.
> 
> Same...
> 
> > (XEN) Xen BUG at page_alloc.c:436
> >
> > To compare with the maximum start address (f800000000) of second part
> mem
> > where xen boots correctly, I also attached the log for your information:
> >
> > (XEN) ----------banks=2--------
> > (XEN) ----------start=80000000--------
> > (XEN) ----------size=7F000000--------
> > (XEN) ----------start=F800000000--------
> > (XEN) ----------size=80000000--------
> > (XEN) Checking for initrd in /chosen
> > (XEN) RAM: 0000000080000000 - 00000000feffffff
> > (XEN) RAM: 000000f800000000 - 000000f87fffffff
> > (XEN)
> > (XEN) MODULE[0]: 0000000084000000 - 00000000841464c8 Xen
> > (XEN) MODULE[1]: 00000000841464c8 - 0000000084148c9b Device Tree
> > (XEN) MODULE[2]: 0000000080080000 - 0000000081080000 Kernel
> > (XEN)  RESVD[0]: 0000000080000000 - 0000000080010000
> > (XEN)
> > (XEN) Command line: noreboot dom0_mem=1024M console=dtuart
> > dtuart=serial0 bootscrub=0
> > (XEN) PFN compression on bits 20...22
> > (XEN) init_boot_pages: ps 0000000080010000 pe 0000000080080000
> > (XEN) init_boot_pages: ps 0000000081080000 pe 0000000084000000
> > (XEN) init_boot_pages: ps 0000000084149000 pe 00000000ff000000
> > (XEN) alloc_boot_pages: nr_pfns 1 pfn_align 1
> > (XEN) alloc_boot_pages: nr_pfns 1 pfn_align 1
> > (XEN) alloc_boot_pages: nr_pfns 1 pfn_align 1
> > (XEN) init_boot_pages: ps 000000f800000000 pe 000000f880000000
> > (XEN) alloc_boot_pages: nr_pfns 450560 pfn_align 8192
> 
> ... here. We are trying to allocate a 1.5GB frametable. You have only
> 4GB of memory so the frametable should be a lot smaller (few tens of MB).
> 
> This is happening because PDX is not able to find many bits to compress.
> I am not sure we can compress more with the current PDX algorithm. This
> may require some extensive improvement to reduce the footprint.

Yes you are right, then I don't have any more questions. Thanks very much
for the detailed explanation.

> 
> On a previous e-mail, you said you tweaked the FVP model to set those
> regions. Were you trying to mimick the memory layout of a real HW
> (either current or future)?

Not really, I was just trying to cover as many cases as possible and these
regions were just picked for testing your patchset in different scenarios.

As the issue is related to the PDX algorithm instead of the heap allocation,
and the "allocating a big heap or two heap banks with a big gap" is tested,
I think this patchset is perfect ^^ Thank you.

Kind regards,

Henry

> 
> Cheers,
> 
> --
> Julien Grall

 


Rackspace

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