PoD: Allocate 4k pages if 2 meg allocation fails
PATCH 1/1 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 <[email protected]>
Including the patch...
Quoted 6 lines · George Dunlap
In
p2m_pod_set_cache_target:
* If a 2-meg allocation fails, try a 4k allocation
* If both allocations fail, return-ENOMEMso that the domain build will fail.Signed-off-by George Dunlap <[email protected]>
xen/arch/x86/mm/p2m.c +13 -1
@@ -386,10 +386,22 @@ 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-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel