Re: [PATCH 2/2] KVM: pre-allocate one more dirty bitmap to avoid vmalloc() in x86's kvm_vm_ioctl_get_dirty_log()

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

 



On Thu, Oct 21, 2010 at 05:40:33PM +0900, Takuya Yoshikawa wrote:
> Currently x86's kvm_vm_ioctl_get_dirty_log() needs to allocate a bitmap by
> vmalloc() which will be used in the next logging and this has been causing
> bad effect to VGA and live-migration: vmalloc() consumes extra systime,
> triggers tlb flush, etc.
> 
> This patch resolves this issue by pre-allocating one more bitmap and switching
> between two bitmaps during dirty logging.
> 
> Performance improvement:
>   I measured performance for the case of VGA update by trace-cmd.

>   So the result was 1.5 times faster than the original.
> 
> 
>   In the case of live migration, the improvement ratio depends on the workload
>   and the guest memory size.
> 
> Note:
>   This does not change other architectures's logic but the allocation size
>   becomes twice. This will increase the actual memory consumption only when
>   the new size changes the number of pages allocated by vmalloc().
> 
> Signed-off-by: Takuya Yoshikawa <yoshikawa.takuya@xxxxxxxxxxxxx>
> Signed-off-by: Fernando Luis Vazquez Cao <fernando@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