[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] Implementing working set tracker in xen
Hi, At 19:56 +0100 on 18 Mar (1426708593), HANNAS YAYA Issa wrote: > ESX Server uses a statistical sampling approach to ob- > tain aggregate VM working set estimates directly, with- > out any guest involvement. Each VM is sampled inde- > pendently, using a configurable sampling period defined > in units of VM execution time. At the start of each sam- > pling period, a small number of the virtual machine?s > ?physical? pages are selected randomly using a uniform > distribution. Each sampled page is tracked by invalidat- > ing any cached mappings associated with its PPN, such > as hardware TLB entries and virtualized MMU state. > The next guest access to a sampled page will be inter- > cepted to re-establish these mappings, at which time a > touched page count is incremented. At the end of the > sampling period, a statistical estimate of the fraction > of memory actively accessed by the VM is f = t/n. > > The algorithm is easy to understand. but I have a real problem while > implementing it. > I don't how I can invalidate all cache mapping with the select physical > number. it's simple to invalidate tlb mapping by flushing the tlb > but I cannot invalidate page table entries that map the selected > physical number because I cannot get the virtual address of the physical > number. > I have the virtual addresse of page table entries only during the > hypercall HYPERVISOR_mmu_update. but this give only the address of the > pages to be updated. > > Please can someone help me to resole this issue. Have a look at the log_dirty/mark_dirty mechanism: that does exactly this, but to _every_ frame of guest memory, for tracking which ones have changed during migrastion. There's already a secondary version of this for tracking only the framebuffer (look for 'dirty_vram') so that changes can be picked up in a GUI. It sounds like what yuop want to do could be another variant of this, where only a random sample of pages are tracked, and you don't need to keep the bitmap of which pages have changed. Cheers, Tim. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |