[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-users] confusion over memory, maxmem, balloon, etc
Thank you Jeffrey, that was a huge help. I have some device driver work under my belt so that all made perfect sense. I assume that the balloons are entirely under manual control at the moment, ie, you can't get domains to pump up their balloons when nothing is going on? Cheers, Dan. Jeffrey I. Schiller wrote: I won't answer all of your questions, but I'll tell you this. The memory parameter establishes the amount of member that domU believes it has. From what I can tell, once you boot domU it cannot use more memory then this (because this is all that the domU kernel knows about). Let's say you set this to 512Mb so your domU kernel is using 512Mb. Suppose you want 128Mb back. Using the “xm” command in dom0 (in 2.0.7 it is the “balloon” subcommand and in 3.0 I believe it is “maxmem” [I'm not 100% on this because I don't have the documentation handy, if you attempt to use “xm balloon” in 3.0 it will tell you the new command name!]) set the domain's memory to 384Mb (512-128). What happens is that dom0 tells the domU's kernel to reduce its memory usage. It does this my kmem alloc'ing 128Mb of memory (so the domU kernel thinks it is using this memory) and then handing the physical memory back to the hypervisor. So as far as the linux kernel is concerned in domU, there is this 128Mb “balloon” of memory that it cannot touch. In fact it isn't there [and I suspect attempting to touch it will cause a fault]. When you give back the memory to domU, the balloon driver requests the memory from the hypervisor to fill in the balloon and then kmem free's it. This makes it available again to domU. This all works the same way in dom0. So you can hand memory from dom0 to domU and back again... Hope this helps. -Jeff P.S. I am not a Xen developer, just a user [of 2.0.7 at the moment, playing with 3.0] who has read some source code :-) _______________________________________________ Xen-users mailing list Xen-users@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-users
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |