[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] RE: [Xen-users] Identifying free pages in guest VM
> -----Original Message----- > From: xen-users-bounces@xxxxxxxxxxxxxxxxxxx > [mailto:xen-users-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of Arun Babu > Sent: 13 November 2006 01:45 > To: xen-users@xxxxxxxxxxxxxxxxxxx > Subject: [Xen-users] Identifying free pages in guest VM > > Hi > > While performing migration of a guest virtual machine from a > physical node to another, > it would be nice if we can figure out the free pages in the > guest VM and opt not to transfer them. > > 1.I came across in the paper "Xen and the Art of > Virtualization", that guest VM can be made > to give the free pages back to Xen before doing migration. That's not a question, right? > 2.What is the way to figure out free pages in guest VM? The guest-OS knows what pages aren't being used (for something important: Linux and Windows both use memory to store file-data when the page isn't being used for something else, but if the page is "clean", i.e. contains a copy of some data that already exists on the disk and not changes to the disk-data), then the page can be discarded as empty. The OS will also keep a small pool of completely free pages that aren't being used at all, ready to be used if the something requests more memory. The sizes of these two categories of pages are pretty arbitrary - at the start of day, all pages are "free", but as the system starts reading files, it will cache those files and the directory structures involved, filling up free memory with disk-cache-data. At some point, it will stop using more pages for disk-cache, and leave those last pages available for allocation. It is also possible that the shadow-paging methods used in the pageing of a virtual machine can help identify pages that aren't being used (i.e. pages that don't have any references in the page-table, for example). Such pages would definitely be empty - but I don't know exactly how and if this method is used at all... Since migration involves walking through the page-table and "processing" that data, normalizing the page-table as it's called, it would make sense that any references based on the page-table data would also be used to eliminate pages that aren't being used. I honestly don't know which of the above methods are used, if one or both or some other. This is just some ramblings based on my understanding of page-tables, memory management in OS's and migration... > 3.Can this be implemented in the tools (xend) code as a part > of the migration framework? > (I was able to note some code where ballooning is happeing.. > ie while memory is being allocated to VM > from hypervisor but i was not able to locate a code where VM > releases memory to hypervisor. Where > can I find it?) Ballooning works according to the principle of the Linux kernel code allocating pages (in kernel mode) and then "donating" those pages to the domain that needs them. It is REQUESTED from the kernel to give up the pages, but it may not do so - for example if the allocation of 200 pages is requested, only 75 pages are "donated". -- Mats > > > It would be of great help if someone can give me some > pointers on this... > -- > Arun > http://www4.ncsu.edu/~abnagara > _______________________________________________ Xen-users mailing list Xen-users@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-users
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |