[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] tmem: When failing allocs from "midsize alloc zone", try the tmem



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1266422080 0
# Node ID 077089e37ac90d9aba7fc72e16a6b8523b294db1
# Parent  b4041e7bbe1b62fab4e3416bbab085b07af57809
tmem: When failing allocs from "midsize alloc zone", try the tmem
pools rather than fail outright.

Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 xen/common/page_alloc.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff -r b4041e7bbe1b -r 077089e37ac9 xen/common/page_alloc.c
--- a/xen/common/page_alloc.c   Wed Feb 17 12:11:13 2010 +0000
+++ b/xen/common/page_alloc.c   Wed Feb 17 15:54:40 2010 +0000
@@ -309,11 +309,11 @@ static struct page_info *alloc_heap_page
 
     /*
      * 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_page
             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_page
         return pg;
     }
 
- fail:
     /* No suitable memory blocks. Fail the request. */
     spin_unlock(&heap_lock);
     return NULL;

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.