Re: [PATCH 3/4] KVM: Count the number of dirty pages for dirty logging

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

 



On Tue, Dec 20, 2011 at 01:29:35PM +0900, Takuya Yoshikawa wrote:
> (2011/11/14 19:07), Avi Kivity wrote:
> >>@@ -1491,7 +1492,8 @@ void mark_page_dirty_in_slot(struct kvm *kvm, struct kvm_memory_slot *memslot,
> >>  	if (memslot&&  memslot->dirty_bitmap) {
> >>  		unsigned long rel_gfn = gfn - memslot->base_gfn;
> >>
> >>-		__set_bit_le(rel_gfn, memslot->dirty_bitmap);
> >>+		if (!__test_and_set_bit_le(rel_gfn, memslot->dirty_bitmap))
> >>+			memslot->nr_dirty_pages++;
> >>  	}
> >>  }
> >>
> 
> [snip]
> 
> >btw mark_page_dirty() itself seems to assume mmu_lock protection that
> >doesn't exist.  Marcelo?
> >

Not mmu_lock protection, kvm->srcu protection.

> I want to hear the answer for this question.
> 
> Though I myself is reading the code, I cannot understand it thoroughly yet.
> I wish if there were mmu_lock entry in locking.txt ...

Agreed.

--
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