xen: arm: reduce the size of the xen heap to max 1/8 RAM size
authorIan Campbell <ian.campbell@citrix.com>
Tue, 23 Jul 2013 17:12:26 +0000 (18:12 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Tue, 20 Aug 2013 14:42:30 +0000 (15:42 +0100)
commit08693f5948d88f70075a5c351f748f7668833efd
tree81e8110ae62ca3a2d9d91df0a9d1db02f3aacd20
parent33daac3995d49d07fec245ea22f2c093fb11bec2
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@citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
xen/arch/arm/setup.c