diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2010-02-17 15:54:40 +0000 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2010-02-17 15:54:40 +0000 |
commit | 533795e7776db68d097d07e09cf8813ad85df859 (patch) | |
tree | 6e61b1d82b48fecc560297dc10f1a90fc7eb7f48 /xen/common/page_alloc.c | |
parent | aa59837d462f69665c2dffb95eac2a28a0d43c3a (diff) | |
download | xen-533795e7776db68d097d07e09cf8813ad85df859.tar.gz xen-533795e7776db68d097d07e09cf8813ad85df859.tar.bz2 xen-533795e7776db68d097d07e09cf8813ad85df859.zip |
tmem: When failing allocs from "midsize alloc zone", try the tmem
pools rather than fail outright.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Diffstat (limited to 'xen/common/page_alloc.c')
-rw-r--r-- | xen/common/page_alloc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c index 54920ff4db..26a0ee9ba1 100644 --- a/xen/common/page_alloc.c +++ b/xen/common/page_alloc.c @@ -309,11 +309,11 @@ static struct page_info *alloc_heap_pages( /* * TMEM: When available memory is scarce, allow only mid-size allocations - * to avoid worst of fragmentation issues. + * to avoid worst of fragmentation issues. Others try TMEM pools then fail. */ if ( opt_tmem && ((order == 0) || (order >= 9)) && (total_avail_pages <= midsize_alloc_zone_pages) ) - goto fail; + goto try_tmem; /* * Start with requested node, but exhaust all node memory in requested @@ -340,6 +340,7 @@ static struct page_info *alloc_heap_pages( node = first_node(node_online_map); } + try_tmem: /* Try to free memory from tmem */ if ( (pg = tmem_relinquish_pages(order,memflags)) != NULL ) { @@ -348,7 +349,6 @@ static struct page_info *alloc_heap_pages( return pg; } - fail: /* No suitable memory blocks. Fail the request. */ spin_unlock(&heap_lock); return NULL; |