All of lore.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Jan Kiszka <jan.kiszka@siemens.com>
Cc: Takuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp>,
	mtosatti@redhat.com, laijs@cn.fujitsu.com, kvm@vger.kernel.org,
	takuya.yoshikawa@gmail.com
Subject: Re: [RFC PATCH 1/2] KVM: count the number of dirty bits for each memslot
Date: Thu, 18 Nov 2010 15:14:18 +0200	[thread overview]
Message-ID: <4CE526AA.8070705@redhat.com> (raw)
In-Reply-To: <4CE525BC.7020906@siemens.com>

On 11/18/2010 03:10 PM, Jan Kiszka wrote:
> Am 18.11.2010 13:54, Avi Kivity wrote:
> >  On 11/18/2010 07:14 AM, Takuya Yoshikawa wrote:
> >>  This patch introduces the counter to hold the number of dirty bits in
> >>  each
> >>  memslot. We will use this to optimize dirty logging later.
> >>
> >>
> >>  @@ -3217,11 +3216,8 @@ int kvm_vm_ioctl_get_dirty_log(struct kvm *kvm,
> >>
> >>        n = kvm_dirty_bitmap_bytes(memslot);
> >>
> >>  -    for (i = 0; !is_dirty&&   i<   n/sizeof(long); i++)
> >>  -        is_dirty = memslot->dirty_bitmap[i];
> >>  -
> >
> >  This can already be an improvement.
>
> /Me wonders if it wouldn't make sense to expand this optimization to the
> user space interface as well, i.e. signaling "there are no dirty pages"
> via some flag instead of writing zeros in a bitmap. Of course, this
> means supporting both interfaces for a longer period.

An 8MB framebuffer is 2K bits, or 256 bytes wide.  Comparing 256 cache 
hot bytes against zero is not worth a new interface.

Larger memory slots are very unlikely to be always unmodified.

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


  reply	other threads:[~2010-11-18 13:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-18  5:12 [RFC PATCH 0/2] KVM: dirty logging optimization Takuya Yoshikawa
2010-11-18  5:14 ` [RFC PATCH 1/2] KVM: count the number of dirty bits for each memslot Takuya Yoshikawa
2010-11-18 12:54   ` Avi Kivity
2010-11-18 13:10     ` Jan Kiszka
2010-11-18 13:14       ` Avi Kivity [this message]
2010-11-18  5:15 ` [RFC PATCH 2/2] KVM: selective write protection using dirty bitmap Takuya Yoshikawa
2010-11-18 13:06   ` Avi Kivity
2010-11-19  8:30     ` 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=4CE526AA.8070705@redhat.com \
    --to=avi@redhat.com \
    --cc=jan.kiszka@siemens.com \
    --cc=kvm@vger.kernel.org \
    --cc=laijs@cn.fujitsu.com \
    --cc=mtosatti@redhat.com \
    --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.