Skip to contentSkip to conversation

kernel /proc information modified for xen mem-set

PATCH Applied Satoshi Uchida 2 participants 2 messages Oct 21, 2005 – Oct 24, 2005

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kernel /proc information modified for xen mem-set

Hi.

I interested that memory capacity can be changed.
But, although xen balloon information(/proc/xen/balloon) is modified for xen mem-set command,
memory information in domain is not modified.

In actually, MemFree is computed each time, but TotalMem is setup at boot time.
So, in top command and etc., memory used decrease, but memory free increased.
However, this is not correct, and If anyone see this information, he/she maybe perplexed.

This patch is reflect TotalMem information. But, I think that like this solution is not excellent.

Thank you.

from xen_changeset : Wed Oct 19 18:18:30 2005 +0100 7438:fb265175f47c

+++ a/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c Fri Oct
21 19:51:41 2005
--- b/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c Fri Oct
21 19:12:33 2005
***************
*** 70,75 ****
--- 70,78 ----
static unsigned long current_pages;
static unsigned long target_pages;

+ /* VM /proc information for memory */
+ extern unsigned long totalram_pages;
+
/* We may hit the hard limit in Xen. If we do then we remember it. */ static unsigned long hard_limit;

***************
*** 223,228 ****
--- 226,232 ----
}

current_pages += nr_pages;
+ totalram_pages = current_pages;

out:
balloon_unlock(flags);
***************
*** 295,300 ****
--- 299,305 ----
XENMEM_decrease_reservation, &reservation) != nr_pages);

current_pages -= nr_pages;
+ totalram_pages = current_pages;

  	balloon_unlock(flags);

Satoshi UCHIDA

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

#1 lore raw
Quoted 12 lines · Satoshi Uchida

I interested that memory capacity can be changed.
But, although xen balloon information(/proc/xen/balloon) is modified for xen mem-set command,
memory information in domain is not modified.

In actually, MemFree is computed each time, but TotalMem is setup at boot time.
So, in top command and etc., memory used decrease, but memory free increased.
However, this is not correct, and If anyone see this information, he/she maybe perplexed.

Quoted 2 lines

This patch is reflect TotalMem information. But, I think that like this solution is not excellent.

its seems fine.

thanks applied.

Signature · 1 line
Vincent Hanquez