From: weiming Subject: how mem-set / balloon changes totalram_pages Date: Thu, 15 Nov 2007 22:41:57 -0500 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Xen Developers List-Id: xen-devel@lists.xenproject.org Hi, I find that after I use xm mem-set to change the current memory allocation of a dom, the MemTotal in /proc/meminfo will give the current allocation. In my understanding, the balloon driver simply alloc / free pages, so the MemTotal should not be changed. Only the free memory will be affected. In normal linux, the value of MemTotal comes from "totalram_pages" defined in arch/i386/mm/init.c I tried to located the code in Xen, which changes the variable, but I didn't find such code. I tried to locate the implementation of HYPERCALL_memory_op, but I can only traced to "call hypercall_page + STR(...)" Can someone tell me where I can find the actual implementation of those hypercalls? Thanks in advance! weiming