[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] xen: arm: reduce the size of the xen heap to max 1/8 RAM size
commit 08693f5948d88f70075a5c351f748f7668833efd Author: Ian Campbell <ian.campbell@xxxxxxxxxx> AuthorDate: Tue Jul 23 18:12:26 2013 +0100 Commit: Ian Campbell <ian.campbell@xxxxxxxxxx> CommitDate: Tue Aug 20 15:42:30 2013 +0100 xen: arm: reduce the size of the xen heap to max 1/8 RAM size When building a 1GB dom0 on a system with 2GB RAM we are running out of domheap pages, while there are still plenty of xenheap pages spare. I would have sworn that when the domheap was exhausted we would fall back to allocating xenheap pages but this doesn't appear to be the case. It's possible that we have setup something incorrectly on ARM but alloc_domheap_pages pretty clearly tries to allocate memory from MEMZONE_XEN+1..zone_hi. Without the fallback from domheap to xenheap taking 1GB of any system with >1GB of RAM for xenheap is excessive so instead set a limit of 1/8 of the total amount of RAM. By way of comparison x86_32 used to have a static 12MB xenheap (which also included .text etc) and in theory supported up to 16GB RAM, by that measure 1/8 is plenty. Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx> Acked-by: Tim Deegan <tim@xxxxxxx> --- xen/arch/arm/setup.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c index 1ec5e38..b184721 100644 --- a/xen/arch/arm/setup.c +++ b/xen/arch/arm/setup.c @@ -316,14 +316,14 @@ static void __init setup_mm(unsigned long dtb_paddr, size_t dtb_size) * * - must be 32 MiB aligned * - must not include Xen itself or the boot modules - * - must be at most 1 GiB + * - must be at most 1/8 the total RAM in the system * - must be at least 128M * * We try to allocate the largest xenheap possible within these * constraints. */ heap_pages = (ram_size >> PAGE_SHIFT); - xenheap_pages = min(1ul << (30 - PAGE_SHIFT), heap_pages); + xenheap_pages = max(heap_pages/8, 128UL<<(20-PAGE_SHIFT)); do { -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |