Re: [PATCH] KVM: x86: enable dirty log gradually in small chunks

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

 



On Wed, Feb 19, 2020 at 06:58:33AM +0000, Zhoujian (jay) wrote:
> > > --- a/include/linux/kvm_host.h
> > > +++ b/include/linux/kvm_host.h
> > > @@ -360,6 +360,11 @@ static inline unsigned long
> > *kvm_second_dirty_bitmap(struct kvm_memory_slot *mem
> > >  	return memslot->dirty_bitmap + len / sizeof(*memslot->dirty_bitmap);
> > > }
> > >
> > > +static inline void kvm_set_first_dirty_bitmap(struct kvm_memory_slot
> > > +*memslot) {
> > > +	bitmap_set(memslot->dirty_bitmap, 0, memslot->npages); }
> > 
> > I'd prefer this be open coded with a comment, e.g. "first" is misleading because
> > it's really "initial dirty bitmap for this memslot after enabling dirty logging".
> 
> kvm_create_dirty_bitmap allocates twice size as large as the actual dirty bitmap
> size, and there is kvm_second_dirty_bitmap to get the second part of the map,
> this is the reason why I use first_dirty_bitmap here, which means the first part
> (not first time) of the dirty bitmap.

Ha, I didn't consider that usage of "first", obviously :-)

> I'll try to be more clear if this is misleading...



[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