Re: [PATCH 1/1] KVM: x86: avoid unnecessary bitmap allocation when memslot is clean

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

 



On Mon, Apr 26, 2010 at 06:58:54PM +0900, Takuya Yoshikawa wrote:
> Although we always allocate a new dirty bitmap in x86's get_dirty_log(),
> it is only used as a zero-source of copy_to_user() and freed right after
> that when memslot is clean. This patch uses clear_user() instead of doing
> this unnecessary zero-source allocation.
> 
> Performance improvement: as we can expect easily, the time needed to
> allocate a bitmap is completely reduced. In my test, the improved ioctl
> was about 4 to 10 times faster than the original one for clean slots.
> Furthermore, the reduced allocations seem to produce good effects for
> other cases too. Actually, I observed that the time for the ioctl was
> more stable than the original one and the average time for dirty slots
> was also reduced by some extent.
> 
> Signed-off-by: Takuya Yoshikawa <yoshikawa.takuya@xxxxxxxxxxxxx>

Looks good to me.

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