Re: [RFC PATCH 1/2] KVM: count the number of dirty bits for each memslot

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

 



On 11/18/2010 07:14 AM, Takuya Yoshikawa wrote:
This patch introduces the counter to hold the number of dirty bits in each
memslot. We will use this to optimize dirty logging later.


@@ -3217,11 +3216,8 @@ int kvm_vm_ioctl_get_dirty_log(struct kvm *kvm,

  	n = kvm_dirty_bitmap_bytes(memslot);

-	for (i = 0; !is_dirty&&  i<  n/sizeof(long); i++)
-		is_dirty = memslot->dirty_bitmap[i];
-

This can already be an improvement.
@@ -152,6 +152,7 @@ struct kvm_memory_slot {
  	unsigned long *rmap;
  	unsigned long *dirty_bitmap;
  	unsigned long *dirty_bitmap_head;
+	unsigned long num_dirty_bits;

The bits themselves are not dirty; only the pages are dirty.

(+ we usually use 'nr' for 'number')



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