[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-users] Balloon Driver Documentation/Description
> That is my understanding of the balloon driver. What i do not understand > is, if the balloon driver consists just of a frontend part in DomU that > is allocating some memory, and a backend driver in Dom0, that gives that > memory back, why is the output of the free command correct? > > What i want to say is the following: > > xendom1:~ # free > total used free > Mem: 786432 117104 669328 > > xendom1:~ # echo -n "536870912" > /proc/xen/balloon > > xendom1:~ # free > total used free > Mem: 524288 116664 407624 > > Why is the total amount of RAM also changing. If the balloon driver just > allocates the memory, the used value should raise, but the total value > should stay. Ooooooh. I don't think it used to do this, so presumably it's got cleverer since I last tried it out. > I am not a kernel hacker, but i think i need to take a look into the > code to understand that. Look for references to totalram_pages proc_misc::meminfo_read_proc() is responsible for generating the output of /proc/meminfo, which in turn is used by free. The total amount of ram is determined by the value in totalram_pages, which gets updated by the balloon driver. Hence the value of free is updated correctly, even though behind the scenes the ballooon driver works by allocating memory and giving it to Xen. It just hides this implementation detail from the user, AFAIK. HTH, Cheers, Mark -- Dave: Just a question. What use is a unicyle with no seat? And no pedals! Mark: To answer a question with a question: What use is a skateboard? Dave: Skateboards have wheels. Mark: My wheel has a wheel! _______________________________________________ Xen-users mailing list Xen-users@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-users
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |