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 12/27/2011 05:03 PM, Takuya Yoshikawa wrote:
> Avi Kivity <avi@xxxxxxxxxx> wrote:
>
> > > It should not be necessary, atomicity of updates to
> > > memslot->dirty_bitmap, because of RCU updates to the memslot pointer
> > > (note memslot = gfn_to_memslot(kvm, gfn); in mark_page_dirty).
> > >
> > > The order is:
> > >
> > > - update page data.
> > > - grab memslot pointer.
> > > - set page bit in memslot.
> > >
> > 
> > What if both grab the same memslot pointer, but set different bits?
>
> (Sorry for my bad wording, that is what I wanted to explain.)
>
> There seems to be possible concurrent __set_bit()'s to the same word
> which will result in bit loss.
>
> I was thinking to change the kvm-unit-tests' dirty log test to write
> to two consecutive pages concurrently.  Is this good for debugging this?

Yes, it already tests some concurrency issues.  Please do write the
test, we should do this a lot more often.

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


[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