From: Marcelo Tosatti <mtosatti@redhat.com>
To: Takuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp>
Cc: avi@redhat.com, kvm@vger.kernel.org, fernando@oss.ntt.co.jp
Subject: Re: [PATCH 2/2] KVM: pre-allocate one more dirty bitmap to avoid vmalloc() in x86's kvm_vm_ioctl_get_dirty_log()
Date: Thu, 21 Oct 2010 16:59:22 -0200 [thread overview]
Message-ID: <20101021185922.GA30703@amt.cnet> (raw)
In-Reply-To: <20101021174033.e2e4c349.yoshikawa.takuya@oss.ntt.co.jp>
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@oss.ntt.co.jp>
> Signed-off-by: Fernando Luis Vazquez Cao <fernando@oss.ntt.co.jp>
Looks good to me.
prev parent reply other threads:[~2010-10-22 1:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-21 8:37 [PATCH 1/2] KVM: introduce wrapper function for creating/destroying dirty bitmaps Takuya Yoshikawa
2010-10-21 8:40 ` [PATCH 2/2] KVM: pre-allocate one more dirty bitmap to avoid vmalloc() in x86's kvm_vm_ioctl_get_dirty_log() Takuya Yoshikawa
2010-10-21 18:59 ` Marcelo Tosatti [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20101021185922.GA30703@amt.cnet \
--to=mtosatti@redhat.com \
--cc=avi@redhat.com \
--cc=fernando@oss.ntt.co.jp \
--cc=kvm@vger.kernel.org \
--cc=yoshikawa.takuya@oss.ntt.co.jp \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox