Skip to contentSkip to conversation

small fix for memory information

PATCH New Satoshi Uchida 1 participant 1 message Mar 8, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 small fix for memory information

Hi.

I found small bug of memory information again.
In recent -unstable, memory information in Guest OSs is difference with actual memory allocation when using extra mem option.
Totalram_pages in Guest OS became amount of memory written mem option.

However, when using -xen0 kernel, this information became correct information.

This cause is that totalram_pages is not updated in init function,
and by handle increase/decrease reservation functions after init function or not, totalram_pages becomes correct value or not.
In because that -xen0 kernel is upload many modules, then above functions is handled. But, In -xenU kernel, not.

This patch is to update totalram_pages at also init function.

However, If it is correct that current_pages is equal to totalram_pages, should it unify these variables?

Thank you,
UCHIDA

linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c Wed Mar 8 11:39:50 2006 renamed from linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c Tue Mar 7 15:48:36 2006 +1 -0
diff -r b41ad96f1242 linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c
@@ -468,6 +468,7 @@
                return -1;
 
        current_pages = min(xen_start_info->nr_pages, max_pfn);
+       totalram_pages = current_pages;
        target_pages  = current_pages;
        balloon_low   = 0;
        balloon_high  = 0;

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel