All of lore.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Alexander Graf <agraf@suse.de>
Cc: "Passera, Pablo R" <pablo.r.passera@intel.com>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>
Subject: Re: Checking  guest memory pages changes from host userspace
Date: Mon, 22 Jun 2009 11:50:09 +0300	[thread overview]
Message-ID: <4A3F45C1.4000201@redhat.com> (raw)
In-Reply-To: <4A3E9186.8020303@redhat.com>

On 06/21/2009 11:01 PM, Avi Kivity wrote:
>> I don't know which operation is more frequent - writing into dirty 
>> mapped memory or reading the dirty map. And I have no idea how long 
>> it would take to find out dirty pages...
>
> The cost of write protection is one fault per dirtied spte.  The cost 
> of looking at the dirty bit is a cache miss per spte (could be reduced 
> by scanning in spte order rather than gfn order).
>
> The problem is when you have a low percentage of memory dirtied.  Then 
> you're scanning a lot of sptes to find a few dirty ones - so the cost 
> per dirty page goes up.
>
> We've talked about write-protecting the upper levels first, but given 
> a random distribution of writes, that doesn't help much.
>

Thinking about it a bit more, when we write-protect pages we're O(spte) 
anyway, so that shouldn't be a barrier.

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


  reply	other threads:[~2009-06-22  8:49 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-19 18:09 Checking guest memory pages changes from host userspace Passera, Pablo R
2009-06-20  6:47 ` Amit Shah
2009-06-21 15:51 ` Avi Kivity
2009-06-21 18:46   ` Alexander Graf
2009-06-21 20:01     ` Avi Kivity
2009-06-22  8:50       ` Avi Kivity [this message]
2009-06-22  9:42         ` Alexander Graf
2009-06-22  9:48           ` Avi Kivity
     [not found]             ` <DC72E7E7-2494-48BF-96C6-F543A29888B1@suse.de>
2009-06-22 11:38               ` Avi Kivity

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=4A3F45C1.4000201@redhat.com \
    --to=avi@redhat.com \
    --cc=agraf@suse.de \
    --cc=kvm@vger.kernel.org \
    --cc=pablo.r.passera@intel.com \
    /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.