On 09/22/2009 02:37 AM, Marcelo Tosatti wrote:
get_dirty_log vs mark_page_dirty need to be mutually exclusive. Switch to mmu_lock protection.
I'm not sure all archs use mmu_lock. Also, I'm unhappy about introducing more use (especially as it's often unnecessary, if dirty logging is turned off for the slot for example).
I think you can use rcu for this as well. When you read the log, allocate a new empty bitmap, switch the memslots pointer to include it, and synchronize_srcu(). Now we are certain everyone is using the new bitmap we can copy the old one to usespace and delete it.
-- Do not meddle in the internals of kernels, for they are subtle and quick to panic. -- 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