Re: Checking guest memory pages changes from host userspace

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 22.06.2009, at 10:50, Avi Kivity wrote:

On 06/21/2009 11:01 PM, Avi Kivity wrote:
I don't know which operation is more frequent - writing into dirty mapped memory or reading the dirty map. And I have no idea how long it would take to find out dirty pages...

The cost of write protection is one fault per dirtied spte. The cost of looking at the dirty bit is a cache miss per spte (could be reduced by scanning in spte order rather than gfn order).

The problem is when you have a low percentage of memory dirtied. Then you're scanning a lot of sptes to find a few dirty ones - so the cost per dirty page goes up.

We've talked about write-protecting the upper levels first, but given a random distribution of writes, that doesn't help much.


Thinking about it a bit more, when we write-protect pages we're O(spte) anyway, so that shouldn't be a barrier.

Yeah, the current implementation is probably the fastest you'll get. I didn't want to slow down shadow page setup due to the dirty update, but I guess compared to the rest of the overhead that doesn't really weight as much.

So I'll go with the same approach on ppc as well :-).

Alex

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux