All of lore.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Marcelo Tosatti <mtosatti@redhat.com>
Cc: kvm@vger.kernel.org
Subject: Re: [patch 3/3] KVM: MMU: prepopulate the shadow on invlpg
Date: Sun, 02 Nov 2008 10:39:10 +0200	[thread overview]
Message-ID: <490D672E.80906@redhat.com> (raw)
In-Reply-To: <20081031223311.GA31882@dmt.cnet>

Marcelo Tosatti wrote:
> Err, I'm on crack. The assumption is that the common case is pte
> invalidation + invlpg: kunmap_atomic, page aging clearing the 
> accessed bit, page reclaim.
>
> Linux COW will invalidate + invlpg (do_wp_page) first:
>
>                 entry = mk_pte(new_page, vma->vm_page_prot);
>                 entry = maybe_mkwrite(pte_mkdirty(entry), vma);
>                 /*
>                  * Clear the pte entry and flush it first, before
>                  * updating the
>                  * pte with the new entry. This will avoid a race
>                  * condition
>                  * seen in the presence of one thread doing SMC and
>                  * another
>                  * thread doing COW.
>                  */
>                 ptep_clear_flush_notify(vma, address, page_table);
>
> Not sure about Windows.
>
>   

Okay, so Linux won't win on this.  But is there any downside, apart from 
fetching the pte and reestablishing the spte?


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


  reply	other threads:[~2008-11-02  8:39 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-25 22:31 [patch 0/3] oos shadow optimizations Marcelo Tosatti
2008-10-25 22:31 ` [patch 1/3] KVM: MMU: collapse remote TLB flushes on root sync Marcelo Tosatti
2008-10-26 11:17   ` Avi Kivity
2008-10-29 23:26     ` Marcelo Tosatti
2008-10-30 10:04       ` Avi Kivity
2008-10-31 19:30         ` Marcelo Tosatti
2008-10-25 22:31 ` [patch 2/3] KVM: MMU: skip global pgtables on sync due to cr3 switch Marcelo Tosatti
2008-10-26 11:27   ` Avi Kivity
2008-10-31 19:36     ` Marcelo Tosatti
2008-10-31 19:43       ` Avi Kivity
2008-10-31 19:50         ` Marcelo Tosatti
2008-10-31 19:59           ` Avi Kivity
2008-10-25 22:31 ` [patch 3/3] KVM: MMU: prepopulate the shadow on invlpg Marcelo Tosatti
2008-10-26 11:48   ` Avi Kivity
2008-10-31 19:47     ` Marcelo Tosatti
2008-10-31 19:58       ` Avi Kivity
2008-10-31 22:33         ` Marcelo Tosatti
2008-11-02  8:39           ` Avi Kivity [this message]
2008-11-02 16:08             ` Marcelo Tosatti
2008-11-02 16:14               ` 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=490D672E.80906@redhat.com \
    --to=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@redhat.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.