public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
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 11:42:48 +0200	[thread overview]
Message-ID: <4B84F498.50405@redhat.com> (raw)
In-Reply-To: <4B84EF4F.8050906@oss.ntt.co.jp>

On 02/24/2010 11:20 AM, Takuya Yoshikawa wrote:
>
> Another issue I am thinking is the x86's bitmap allocation. Doing 
> vmalloc()
> every time is not nice, though I know it's needed.
>

Right, that's why I want to move the allocation to userspace.

>>
>> btw, one idea I had was to allocate the bitmap in userspace and let 
>> the kernel set bits directly.  This reduces the amount of unswappable 
>> memory the kernel allocates and reduces copying.
>>
>> A problem with this is that userspace cannot just clear the bits, 
>> since the kernel has to write-protect the pages again.  I don't know 
>> how we can do this without copying the bitmap.
>>
>
> Yes, seems difficult.

Here's an idea: double buffering.  Instead of copying the dirty log to 
userspace, we switch the dirty log bitmap to another location 
atomically.  Then userspace can read the old bitmap.

Note the speed savings won't be huge, since the copying brings the 
bitmap into cache, so the second pass is fairly fast.  But if we combine 
it with dropping the qemu byte-based dirty log, then we eliminate the 
second pass as well.

-- 
error compiling committee.c: too many arguments to function


  reply	other threads:[~2010-02-24  9:42 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 [this message]
2010-02-24  9:45   ` Takuya Yoshikawa
2010-02-24 10:03     ` Avi Kivity
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=4B84F498.50405@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