From: Avi Kivity <avi@redhat.com>
To: Takuya Yoshikawa <takuya.yoshikawa@gmail.com>
Cc: mtosatti@redhat.com, kvm@vger.kernel.org,
yoshikawa.takuya@oss.ntt.co.jp, qemu-devel@nongnu.org,
qemu-devel <qemu-devel@nongnu.org>
Subject: Re: Heavy memory_region_get_dirty() -- Re: [PATCH 0/1 v2] KVM: Alleviate mmu_lock contention during dirty logging
Date: Wed, 02 May 2012 14:33:55 +0300 [thread overview]
Message-ID: <4FA11BA3.2000605@redhat.com> (raw)
In-Reply-To: <20120502202414.37d760fbb1135bb8acb0f0db@gmail.com>
On 05/02/2012 02:24 PM, Takuya Yoshikawa wrote:
> During checking mmu_lock contention, I noticed that QEMU's
> memory_region_get_dirty() was using unexpectedly much CPU time.
>
> Thanks,
> Takuya
>
> =============================
> perf top -t ${QEMU_TID}
> =============================
> 51.52% qemu-system-x86_64 [.] memory_region_get_dirty
> 16.73% qemu-system-x86_64 [.] ram_save_remaining
>
memory_region_get_dirty() is called from ram_save_remaining(). Looks
like quadratic behaviour here: we send a few pages in
ram_save_remaining(), then walk the entire dirty bitmap to calculate
expected_time().
We should probably calculate expected_time once per iteration.
--
error compiling committee.c: too many arguments to function
WARNING: multiple messages have this Message-ID (diff)
From: Avi Kivity <avi@redhat.com>
To: Takuya Yoshikawa <takuya.yoshikawa@gmail.com>
Cc: yoshikawa.takuya@oss.ntt.co.jp, mtosatti@redhat.com,
qemu-devel <qemu-devel@nongnu.org>,
kvm@vger.kernel.org
Subject: Re: [Qemu-devel] Heavy memory_region_get_dirty() -- Re: [PATCH 0/1 v2] KVM: Alleviate mmu_lock contention during dirty logging
Date: Wed, 02 May 2012 14:33:55 +0300 [thread overview]
Message-ID: <4FA11BA3.2000605@redhat.com> (raw)
In-Reply-To: <20120502202414.37d760fbb1135bb8acb0f0db@gmail.com>
On 05/02/2012 02:24 PM, Takuya Yoshikawa wrote:
> During checking mmu_lock contention, I noticed that QEMU's
> memory_region_get_dirty() was using unexpectedly much CPU time.
>
> Thanks,
> Takuya
>
> =============================
> perf top -t ${QEMU_TID}
> =============================
> 51.52% qemu-system-x86_64 [.] memory_region_get_dirty
> 16.73% qemu-system-x86_64 [.] ram_save_remaining
>
memory_region_get_dirty() is called from ram_save_remaining(). Looks
like quadratic behaviour here: we send a few pages in
ram_save_remaining(), then walk the entire dirty bitmap to calculate
expected_time().
We should probably calculate expected_time once per iteration.
--
error compiling committee.c: too many arguments to function
next prev parent reply other threads:[~2012-05-02 11:34 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-28 10:05 [PATCH 0/1 v2] KVM: Alleviate mmu_lock contention during dirty logging Takuya Yoshikawa
2012-04-28 10:07 ` [PATCH 1/1 v2] KVM: Reduce mmu_lock contention during dirty logging by cond_resched() Takuya Yoshikawa
2012-04-29 11:27 ` Avi Kivity
2012-04-29 12:17 ` Takuya Yoshikawa
2012-04-29 12:59 ` Avi Kivity
2012-04-29 14:24 ` Takuya Yoshikawa
2012-04-29 14:39 ` Avi Kivity
2012-04-29 14:55 ` Takuya Yoshikawa
2012-04-29 15:00 ` Avi Kivity
2012-04-29 15:13 ` Takuya Yoshikawa
2012-04-29 15:20 ` Avi Kivity
2012-04-30 14:06 ` Takuya Yoshikawa
2012-05-01 3:04 ` Marcelo Tosatti
2012-05-01 13:14 ` Takuya Yoshikawa
2012-05-01 3:07 ` Marcelo Tosatti
2012-05-02 11:24 ` Heavy memory_region_get_dirty() -- Re: [PATCH 0/1 v2] KVM: Alleviate mmu_lock contention during dirty logging Takuya Yoshikawa
2012-05-02 11:24 ` [Qemu-devel] " Takuya Yoshikawa
2012-05-02 11:33 ` Avi Kivity [this message]
2012-05-02 11:33 ` Avi Kivity
2012-05-02 14:20 ` Takuya Yoshikawa
2012-05-02 14:20 ` [Qemu-devel] " Takuya Yoshikawa
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=4FA11BA3.2000605@redhat.com \
--to=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=takuya.yoshikawa@gmail.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.