public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
To: "Dong, Eddie" <eddie.dong-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: shadow prefetch
Date: Wed, 02 Jan 2008 11:51:16 +0200	[thread overview]
Message-ID: <477B5E94.30301@qumranet.com> (raw)
In-Reply-To: <10EA09EFD8728347A513008B6B0DA77A02976A8E-wq7ZOvIWXbNpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>

Dong, Eddie wrote:
> Current shadow code do prefetch in FNAME(prefetch_page), but it is only
> used 
> to choose shadow_notrap_nonpresent_pte or shadow_trap_nonpresent_pte.
>
> At least for L1 shadow, prefetching to get exact shadow L1 pte won't
> cause 
> performance regression (though handling time increases slightly ) since
> it 
> won't generate a new write protected page.
>
>   
I'm not sure that "slightly" is accurate, we need to fetch 512 or 1024 
entries.  On the other hand, we have the benefit of batching (a call to 
get_user_pages() with n = 512 is much faster than 512 calls.  I think 
that this will improve fork()s, but reduce performance with 
sparsely-accessed memory maps, or with fork() followed by exec() 
immediately.

Only benchmarking can tell if it is an overall win.

Xen limits the prefetch to a subset of the pages, maybe that's a better 
approach.


> for those L2+ shadow page tables, we can do similar for those pointed
> gfn which
> is already shadowed

I think L2s are very rare compared to L1 page tables, so any benefit 
would be minor.

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


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

  parent reply	other threads:[~2008-01-02  9:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-02  6:52 shadow prefetch Dong, Eddie
     [not found] ` <10EA09EFD8728347A513008B6B0DA77A02976A8E-wq7ZOvIWXbNpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2008-01-02  9:51   ` Avi Kivity [this message]
     [not found]     ` <477B5E94.30301-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2008-01-02 12:56       ` Dong, Eddie

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=477B5E94.30301@qumranet.com \
    --to=avi-atkuwr5tajbwk0htik3j/w@public.gmane.org \
    --cc=eddie.dong-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    /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