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] Allow max_pages to be set to less than to

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Allow max_pages to be set to less than tot_pages
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 27 Oct 2010 19:15:20 -0700
Delivery-date: Wed, 27 Oct 2010 19:15:42 -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@xxxxxxx>
# Date 1287922384 -3600
# Node ID 2208a036f8d9d932de8ab0aa0206f5c57dba8728
# Parent  c6e2f69e1807fb232b16983b040489fe30241cd7
Allow max_pages to be set to less than tot_pages

The memory allocation code sometimes needs to enforce that a guest
that's been told to balloon down isn't going to expand further
(because it's still executing a previous balloon-up operation).  That
means being able to set the desired max_pages even before the balloon
driver has brought tot_pages down to the right level.

Signed-off-by: Tim Deegan <Tim.Deegan@xxxxxxxxxx>
Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
 xen/common/domctl.c |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diff -r c6e2f69e1807 -r 2208a036f8d9 xen/common/domctl.c
--- a/xen/common/domctl.c       Sun Oct 24 13:09:50 2010 +0100
+++ b/xen/common/domctl.c       Sun Oct 24 13:13:04 2010 +0100
@@ -770,11 +770,13 @@ long do_domctl(XEN_GUEST_HANDLE(xen_domc
         new_max = op->u.max_mem.max_memkb >> (PAGE_SHIFT-10);
 
         spin_lock(&d->page_alloc_lock);
-        if ( new_max >= d->tot_pages )
-        {
-            d->max_pages = new_max;
-            ret = 0;
-        }
+        /*
+         * NB. We removed a check that new_max >= current tot_pages; this means
+         * that the domain will now be allowed to "ratchet" down to new_max. In
+         * the meantime, while tot > max, all new allocations are disallowed.
+         */
+        d->max_pages = new_max;
+        ret = 0;
         spin_unlock(&d->page_alloc_lock);
 
     max_mem_out:

_______________________________________________
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] Allow max_pages to be set to less than tot_pages, Xen patchbot-unstable <=