From: Avi Kivity <avi@redhat.com>
To: Takuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp>
Cc: mtosatti@redhat.com, kvm@vger.kernel.org
Subject: Re: [PATCH 0/1] KVM: make get dirty log ioctl return the first dirty page's position
Date: Wed, 24 Feb 2010 12:03:22 +0200 [thread overview]
Message-ID: <4B84F96A.1000205@redhat.com> (raw)
In-Reply-To: <4B84F557.6020400@oss.ntt.co.jp>
On 02/24/2010 11:45 AM, Takuya Yoshikawa wrote:
> Avi Kivity wrote:
>>>
>>> Result:
>>> ...
>>> kvm_get_map(slot 0): r= 3, slot.len= 655360(2)
>>> kvm_get_map(slot 1): r= 2044, slot.len= 535822336(2044)
>>> kvm_get_map(slot 2): r= 1, slot.len= 131072(0)
>>> kvm_get_map(slot 3): r= 1, slot.len= 131072(0)
>>> kvm_get_map(slot 4): r= 1, slot.len= 131072(0)
>>> kvm_get_map(slot 5): r= 64, slot.len= 16777216(64)
>>> kvm_get_map(slot 6): r= 1, slot.len= 32768(0)
>>> kvm_get_map(slot 7): r= 1, slot.len= 32768(0)
>>> kvm_get_map(slot 0): r= 3, slot.len= 655360(2)
>>> kvm_get_map(slot 1): r= 2044, slot.len= 535822336(2044)
>>> kvm_get_map(slot 2): r= 1, slot.len= 131072(0)
>>> kvm_get_map(slot 3): r= 1, slot.len= 131072(0)
>>> kvm_get_map(slot 4): r= 1, slot.len= 131072(0)
>>> kvm_get_map(slot 5): r= 64, slot.len= 16777216(64)
>>> kvm_get_map(slot 6): r= 1, slot.len= 32768(0)
>>> kvm_get_map(slot 7): r= 1, slot.len= 32768(0)
>>> kvm_get_map(slot 0): r= 3, slot.len= 655360(2)
>>> kvm_get_map(slot 1): r= 2044, slot.len= 535822336(2044)
>>> kvm_get_map(slot 2): r= 1, slot.len= 131072(0)
>>> kvm_get_map(slot 3): r= 1, slot.len= 131072(0)
>>> kvm_get_map(slot 4): r= 1, slot.len= 131072(0)
>>> kvm_get_map(slot 5): r= 64, slot.len= 16777216(64)
>>> kvm_get_map(slot 6): r= 1, slot.len= 32768(0)
>>> kvm_get_map(slot 7): r= 1, slot.len= 32768(0)
>>> kvm_get_map(slot 0): r= 3, slot.len= 655360(2)
>>> kvm_get_map(slot 1): r= 2044, slot.len= 535822336(2044)
>>> kvm_get_map(slot 2): r= 1, slot.len= 131072(0)
>>> kvm_get_map(slot 3): r= 1, slot.len= 131072(0)
>>> kvm_get_map(slot 4): r= 1, slot.len= 131072(0)
>>> kvm_get_map(slot 5): r= 64, slot.len= 16777216(64)
>>> kvm_get_map(slot 6): r= 1, slot.len= 32768(0)
>>> kvm_get_map(slot 7): r= 1, slot.len= 32768(0)
>>> ...
>>
>> Seems to confirm - not much can be skipped.
>>
>
>
> >> kvm_get_map(slot 1): r= 2044, slot.len= 535822336(2044)
> Am I wrong? in this case, the return value is suggesting
> we can skip every 2044(the value in the bracket) bitmap check, right?
Er, I was wrong, I thought the value in the brackets had the same units
as slots.len. But it's in units of ulongs.
In this case, the entire bitmap can be skipped, so the saving would be
significant. But this is for an idle load, where we'll converge quickly
anyway. For a busy server, things will look different.
So I recommend you look at the double buffer approach. This can
eliminate the kernel scan, the copying, and the userspace scan entirely,
as well as remove the vmalloc().
--
error compiling committee.c: too many arguments to function
next prev parent reply other threads:[~2010-02-24 10:03 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-24 8:43 [PATCH 0/1] KVM: make get dirty log ioctl return the first dirty page's position Takuya Yoshikawa
2010-02-24 8:45 ` [PATCH 1/1] " Takuya Yoshikawa
2010-02-24 8:55 ` [PATCH 0/1] " Avi Kivity
2010-02-24 8:59 ` Avi Kivity
2010-02-24 9:20 ` Takuya Yoshikawa
2010-02-24 9:42 ` Avi Kivity
2010-02-24 9:45 ` Takuya Yoshikawa
2010-02-24 10:03 ` Avi Kivity [this message]
2010-02-24 10:09 ` 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=4B84F96A.1000205@redhat.com \
--to=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox