Skip to contentSkip to conversation

detecting paging inside of VMs

DISCUSSION Tim Wood 2 participants 2 messages Jun 21, 2006

lore
Share & tools
lore

Tim Wood

author
#0 lore raw

I'd like to be able to detect when a VM is pressed for memory without doing anything inside of the VM.

My idea is to add some code in the hypervisor that would try to detect paging in each domU, or maybe just monitor the rate at which memory pages are being requested and released.

I know that the guest OSes are responsible for managing their own page tables, but I suspect that some of this still goes through the VMM.

I'm willing to do some hacking, but I'm not yet sure if the information I'd need can be obtained in the hypervisor. I'd rather not modify the user level xen kernels if possible.

Does any of this seem plausible? Thanks for any info!

-Tim

p.s. of course if you have any other ideas (that are transparent to the domU) I'd be interested to hear

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#1 lore raw
Quoted 5 lines · Tim Wood

I'd like to be able to detect when a VM is pressed for memory without doing anything inside of the VM.

My idea is to add some code in the hypervisor that would try to detect paging in each domU, or maybe just monitor the rate at which memory pages are being requested and released.

I know that the guest OSes are responsible for managing their own page tables, but I suspect that some of this still goes through the VMM.

If you know the domU has a swap partition then you could modify blkback driver in dom0 (or pull stats out of it somehow) to detect swap activity. Dom0 seems a better probe point than Xen -- it knows about I/O and it will also be the place where you implement policy to decide who gets what memory.

-- Keir