public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: OHMURA Kei <ohmura.kei@lab.ntt.co.jp>
To: Avi Kivity <avi@redhat.com>
Cc: kvm@vger.kernel.org, qemu-devel@nongnu.org,
	Jan Kiszka <jan.kiszka@siemens.com>,
	anthony@codemonkey.ws,
	Yoshiaki Tamura <tamura.yoshiaki@lab.ntt.co.jp>,
	ohmura.kei@lab.ntt.co.jp
Subject: Re: [PATCH 1/3] qemu-kvm: Wrap phys_ram_dirty with additional inline functions.
Date: Fri, 12 Feb 2010 11:08:00 +0900	[thread overview]
Message-ID: <4B74B800.2060006@lab.ntt.co.jp> (raw)
In-Reply-To: <4B73FB39.1000200@redhat.com>

> Why do you need a counter? It may be sufficient to set a single bit.
> This reduces the memory overhead and perhaps cache thrashing.

Thanks for looking into this.  I agree with your opinion.

Our motivation here is to skip traveling when the dirty bitmap is really sparse
or dense, so either setting a bit or counting up would be fine.

There is one advantage to the counter approach that we can make this large
traveling granularity flexible.  In case of the bit approach, the maximum
granularity is limited to HOST_LONG_BITS.  If you think this flexibility is to
be useless, we would take the bit approach.

By the way, this is about filling the gap of the dirty bitmap management 
between kvm and qemu.  Do you think we should set a bit when qemu's 
phys_ram_dirty is 0xff or !0?

Radically, if we could have a bit-based phys_ram_dirty_by_word, we may just OR
the dirty bitmap of kvm with qemu in kvm_get_dirty_pages_log_range()...

  reply	other threads:[~2010-02-12  2:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-08 10:22 [PATCH 1/3] qemu-kvm: Wrap phys_ram_dirty with additional inline functions OHMURA Kei
2010-02-11 12:42 ` Avi Kivity
2010-02-12  2:08   ` OHMURA Kei [this message]
2010-02-13  7:33     ` Avi Kivity
2010-02-15  5:05       ` Yoshiaki Tamura

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=4B74B800.2060006@lab.ntt.co.jp \
    --to=ohmura.kei@lab.ntt.co.jp \
    --cc=anthony@codemonkey.ws \
    --cc=avi@redhat.com \
    --cc=jan.kiszka@siemens.com \
    --cc=kvm@vger.kernel.org \
    --cc=qemu-devel@nongnu.org \
    --cc=tamura.yoshiaki@lab.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