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] PoD: Allocate 4k pages if 2 meg allocatio

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] PoD: Allocate 4k pages if 2 meg allocation fails
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 25 Sep 2009 02:55:19 -0700
Delivery-date: Fri, 25 Sep 2009 02:56:19 -0700
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 1253872056 -3600
# Node ID fa41a706d0181e190512c9665f3e7654ca4ba2f6
# Parent  dc72e4fbab2783566a0757d1269205c9b663f520
PoD: Allocate 4k pages if 2 meg allocation fails

In p2m_pod_set_cache_target:
 * If a 2-meg allocation fails, try a 4k allocation
 * If both allocations fail, return -ENOMEM so that the domain build
   will fail.

Signed-off-by: George Dunlap <george.dunlap@xxxxxxxxxxxxx>
---
 xen/arch/x86/mm/p2m.c |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletion(-)

diff -r dc72e4fbab27 -r fa41a706d018 xen/arch/x86/mm/p2m.c
--- a/xen/arch/x86/mm/p2m.c     Fri Sep 25 10:46:13 2009 +0100
+++ b/xen/arch/x86/mm/p2m.c     Fri Sep 25 10:47:36 2009 +0100
@@ -386,10 +386,22 @@ p2m_pod_set_cache_target(struct domain *
             order = 9;
         else
             order = 0;
-
+    retry:
         page = alloc_domheap_pages(d, order, 0);
         if ( unlikely(page == NULL) )
+        {
+            if ( order == 9 )
+            {
+                /* If we can't allocate a superpage, try singleton pages */
+                order = 0;
+                goto retry;
+            }   
+            
+            printk("%s: Unable to allocate domheap page for pod cache.  target 
%lu cachesize %d\n",
+                   __func__, pod_target, p2md->pod.count);
+            ret = -ENOMEM;
             goto out;
+        }
 
         p2m_pod_cache_add(d, page, order);
     }

_______________________________________________
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] PoD: Allocate 4k pages if 2 meg allocation fails, Xen patchbot-unstable <=