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

[Xen-devel] [PATCH] x86: adjust available memory calculation for Dom0 construction



With a large number of CPUs, the amount of memory needed to construct
the vCPU structures for Dom0 becomes significant and hence should be
accounted for when calculating the amount of memory to pass to Dom0.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>

--- 2010-03-09.orig/xen/arch/x86/domain_build.c 2010-03-09 00:00:00.000000000 
+0100
+++ 2010-03-09/xen/arch/x86/domain_build.c      2010-03-10 16:49:52.000000000 
+0100
@@ -155,6 +155,13 @@ static unsigned long __init compute_dom0
     unsigned long min_pages = dom0_min_nrpages;
     unsigned long max_pages = dom0_max_nrpages;
 
+    avail -= (opt_dom0_max_vcpus - 1UL)
+             << get_order_from_bytes(sizeof(struct vcpu));
+#ifdef __x86_64__
+    if ( sizeof_long == sizeof(int) )
+        avail -= opt_dom0_max_vcpus - 1;
+#endif
+
     /*
      * If domain 0 allocation isn't specified, reserve 1/16th of available
      * memory for things like DMA buffers. This reservation is clamped to 



Attachment: x86-dom0-alloc-avail.patch
Description: Text document

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

 


Rackspace

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