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.
--
error compiling committee.c: too many arguments to function
--
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