aboutsummaryrefslogtreecommitdiffstats
path: root/xen/common/page_alloc.c
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2010-05-04 12:42:21 +0100
committerKeir Fraser <keir.fraser@citrix.com>2010-05-04 12:42:21 +0100
commita03bd60cee72d1d7f025398c98130da7a011492e (patch)
treea485b55482f7215259a0636bd715c9f0deee3eb7 /xen/common/page_alloc.c
parentc499509ef2595a5daa8ef804168c94291e90ec48 (diff)
downloadxen-a03bd60cee72d1d7f025398c98130da7a011492e.tar.gz
xen-a03bd60cee72d1d7f025398c98130da7a011492e.tar.bz2
xen-a03bd60cee72d1d7f025398c98130da7a011492e.zip
x86: fix Dom0 booting time regression
Unfortunately the changes in c/s 21035 caused boot time to go up significantly on certain large systems. To rectify this without going back to the old behavior, introduce a new memory allocation flag so that Dom0 allocations can exhaust non-DMA memory before starting to consume DMA memory. For the latter, the behavior introduced in aforementioned c/s gets retained, while for the former we can now even try larger chunks first. This builds on the fact that alloc_chunk() gets called with non- increasing 'max_pages' arguments, end hence it can store locally the allocation order last used (as larger order allocations can't succeed during subsequent invocations if they failed once). Signed-off-by: Jan Beulich <jbeulich@novell.com>
Diffstat (limited to 'xen/common/page_alloc.c')
-rw-r--r--xen/common/page_alloc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c
index 53437a461a..6a1b6bde72 100644
--- a/xen/common/page_alloc.c
+++ b/xen/common/page_alloc.c
@@ -1157,8 +1157,9 @@ struct page_info *alloc_domheap_pages(
pg = alloc_heap_pages(dma_zone + 1, zone_hi, node, order, memflags);
if ( (pg == NULL) &&
- ((pg = alloc_heap_pages(MEMZONE_XEN + 1, zone_hi,
- node, order, memflags)) == NULL) )
+ ((memflags & MEMF_no_dma) ||
+ ((pg = alloc_heap_pages(MEMZONE_XEN + 1, zone_hi,
+ node, order, memflags)) == NULL)) )
return NULL;
if ( (d != NULL) && assign_pages(d, pg, order, memflags) )