From: Marcelo Tosatti <mtosatti@redhat.com>
To: Takuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp>
Cc: avi@redhat.com, kvm@vger.kernel.org
Subject: Re: [PATCH 1/1] KVM: x86: avoid unnecessary bitmap allocation when memslot is clean
Date: Tue, 27 Apr 2010 09:36:17 -0300 [thread overview]
Message-ID: <20100427123617.GA18410@amt.cnet> (raw)
In-Reply-To: <20100426185854.5d606a04.yoshikawa.takuya@oss.ntt.co.jp>
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@oss.ntt.co.jp>
Looks good to me.
next prev parent reply other threads:[~2010-04-27 13:01 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-26 9:56 [PATCH 0/1] KVM: x86: avoid unnecessary bitmap allocation when memslot is clean Takuya Yoshikawa
2010-04-26 9:58 ` [PATCH 1/1] " Takuya Yoshikawa
2010-04-27 12:36 ` Marcelo Tosatti [this message]
2010-04-27 13:18 ` Avi Kivity
2010-04-27 13:46 ` Takuya Yoshikawa
2010-04-28 4:17 ` Takuya Yoshikawa
2010-04-28 10:27 ` Avi Kivity
2010-04-28 10:26 ` Avi Kivity
2010-04-28 9:50 ` [PATCH v2] " Takuya Yoshikawa
2010-05-04 9:36 ` Avi Kivity
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=20100427123617.GA18410@amt.cnet \
--to=mtosatti@redhat.com \
--cc=avi@redhat.com \
--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