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-devel

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

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] x86: adjust available memory calculation for Dom0 construction
From: "Jan Beulich" <JBeulich@xxxxxxxxxx>
Date: Thu, 11 Mar 2010 16:44:54 +0000
Delivery-date: Thu, 11 Mar 2010 08:45:26 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] x86: adjust available memory calculation for Dom0 construction, Jan Beulich <=