WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] tmem: When failing allocs from "midsize a

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] tmem: When failing allocs from "midsize alloc zone", try the tmem
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 22 Feb 2010 02:15:10 -0800
Delivery-date: Mon, 22 Feb 2010 02:15:12 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] tmem: When failing allocs from "midsize alloc zone", try the tmem, Xen patchbot-unstable <=