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

[Xen-changelog] [linux-2.6.18-xen] Stop low memory from appearing -ve in /proc/meminfo when ballooned.



# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1183324052 -3600
# Node ID 57ab8dd47580c2f726556fe1c46b5401f2bddb1e
# Parent  0be610b725fae4cd6de8f0b111660a186f93b86d
Stop low memory from appearing -ve in /proc/meminfo when ballooned.
Signed-off-by: Mark Williamson <mark.williamson@xxxxxxxxxxxx>
---
 drivers/xen/balloon/balloon.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletion(-)

diff -r 0be610b725fa -r 57ab8dd47580 drivers/xen/balloon/balloon.c
--- a/drivers/xen/balloon/balloon.c     Wed Jun 27 16:31:36 2007 +0100
+++ b/drivers/xen/balloon/balloon.c     Sun Jul 01 22:07:32 2007 +0100
@@ -83,6 +83,7 @@ static unsigned long frame_list[PAGE_SIZ
 
 /* VM /proc information for memory */
 extern unsigned long totalram_pages;
+extern unsigned long totalhigh_pages;
 
 /* List of ballooned pages, threaded through the mem_map array. */
 static LIST_HEAD(ballooned_pages);
@@ -118,6 +119,7 @@ static void balloon_append(struct page *
        if (PageHighMem(page)) {
                list_add_tail(PAGE_TO_LIST(page), &ballooned_pages);
                bs.balloon_high++;
+               totalhigh_pages--;
        } else {
                list_add(PAGE_TO_LIST(page), &ballooned_pages);
                bs.balloon_low++;
@@ -135,8 +137,10 @@ static struct page *balloon_retrieve(voi
        page = LIST_TO_PAGE(ballooned_pages.next);
        UNLIST_PAGE(page);
 
-       if (PageHighMem(page))
+       if (PageHighMem(page)) {
                bs.balloon_high--;
+               totalhigh_pages++;
+       }
        else
                bs.balloon_low--;
 

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


 


Rackspace

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