Satoshi Uchida
2005-Oct-21 11:08 UTC
[Xen-devel] [PATCH] 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 Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Vincent Hanquez
2005-Oct-24 17:04 UTC
Re: [Xen-devel] [PATCH] kernel /proc information modified for xen mem-set
On Fri, Oct 21, 2005 at 08:08:59PM +0900, Satoshi Uchida wrote:> 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.its seems fine. thanks applied. -- Vincent Hanquez _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel