aboutsummaryrefslogtreecommitdiffstats
path: root/xen/common/page_alloc.c
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2010-06-23 23:23:22 +0100
committerKeir Fraser <keir.fraser@citrix.com>2010-06-23 23:23:22 +0100
commit89784f9469174e6b30cfcfa74162d45f268d366a (patch)
treeeda1cc516798583bd6046d4c5d947c877fe8e8f6 /xen/common/page_alloc.c
parent7b76ecc628b908df7bc1c677be5419985eceb25d (diff)
downloadxen-89784f9469174e6b30cfcfa74162d45f268d366a.tar.gz
xen-89784f9469174e6b30cfcfa74162d45f268d366a.tar.bz2
xen-89784f9469174e6b30cfcfa74162d45f268d366a.zip
tmem: skip special case in alloc_heap_pages() if tmem holds no pages
Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Diffstat (limited to 'xen/common/page_alloc.c')
-rw-r--r--xen/common/page_alloc.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c
index 6a1b6bde72..10c6b22093 100644
--- a/xen/common/page_alloc.c
+++ b/xen/common/page_alloc.c
@@ -316,11 +316,14 @@ static struct page_info *alloc_heap_pages(
spin_lock(&heap_lock);
/*
- * TMEM: When available memory is scarce, allow only mid-size allocations
- * to avoid worst of fragmentation issues. Others try TMEM pools then fail.
+ * TMEM: When available memory is scarce due to tmem absorbing it, allow
+ * only mid-size allocations to avoid worst of fragmentation issues.
+ * Others try tmem pools then fail. This is a workaround until all
+ * post-dom0-creation-multi-page allocations can be eliminated.
*/
if ( opt_tmem && ((order == 0) || (order >= 9)) &&
- (total_avail_pages <= midsize_alloc_zone_pages) )
+ (total_avail_pages <= midsize_alloc_zone_pages) &&
+ tmem_freeable_pages() )
goto try_tmem;
/*