public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Marcelo Tosatti <marcelo-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org>
Cc: kvm-devel
	<kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>,
	Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
Subject: Re: [RFC] VMX CR3 cache
Date: Wed, 30 Jan 2008 10:18:27 +0100	[thread overview]
Message-ID: <47A040E3.7000207@redhat.com> (raw)
In-Reply-To: <47A034CD.9010708-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>

Gerd Hoffmann wrote:
> I've passed in a physical address.  The vmx_cr3_cache_msr() function has
> a gva_to_page() call which makes me suspect it expects a virtual
> address.

Confirmed.  When passing in a virtual address it works.
And it gives me a nice speedup for kernel builds:

rhel5-64 kraxel ~# cat kbench-cr3-*
date:    Wed Jan 30 09:50:03 CET 2008
host:    2.6.18-53.el5xen x86_64 (cr3-cache)
target:  linux-2.6.21 i386 vmlinux
config:  allnoconfig
   1: real 184.03 user 96.66 sys 41.30
   2: real 137.23 user 91.57 sys 37.93
   3: real 136.53 user 90.98 sys 38.39
date:    Wed Jan 30 09:37:10 CET 2008
host:    2.6.18-53.el5xen x86_64 (cr3-nocache)
target:  linux-2.6.21 i386 vmlinux
config:  allnoconfig
   1: real 182.47 user 112.33 sys 41.56
   2: real 175.75 user 109.45 sys 40.53
   3: real 173.54 user 108.49 sys 41.22

xen pv guests on 64bit do two cr3 switches per syscall due to
kernel/userspace separation being done by having two different page
table sets.  Thus cr3 caching eliminates two vmexits per xen guest
system call, and the pgd caching probably helps too.  Watching
statistics confirms that the number of vmexits goes down significantly.

I strongly support cr3 caching being merged (after being cleaned up of
course).

cheers,
  Gerd

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

  parent reply	other threads:[~2008-01-30  9:18 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-28 16:04 [RFC] VMX CR3 cache Marcelo Tosatti
2008-01-28 17:17 ` Ingo Molnar
     [not found]   ` <20080128171734.GA19705-X9Un+BFzKDI@public.gmane.org>
2008-01-28 17:35     ` Marcelo Tosatti
2008-01-28 17:37       ` Ingo Molnar
     [not found]         ` <20080128173707.GB22487-X9Un+BFzKDI@public.gmane.org>
2008-01-28 18:17           ` Marcelo Tosatti
2008-01-28 17:23 ` Avi Kivity
2008-01-29  8:54 ` Gerd Hoffmann
     [not found]   ` <479EE9C3.8000007-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2008-01-29 10:28     ` Gerd Hoffmann
     [not found]       ` <479EFFB0.1000700-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2008-01-29 10:32         ` Gerd Hoffmann
2008-01-29 12:33         ` Marcelo Tosatti
2008-01-30  8:26           ` Gerd Hoffmann
     [not found]             ` <47A034CD.9010708-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2008-01-30  9:18               ` Gerd Hoffmann [this message]
     [not found]                 ` <47A040E3.7000207-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2008-01-30 10:10                   ` Avi Kivity
     [not found]                     ` <47A04D1C.4090505-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2008-01-30 12:05                       ` Gerd Hoffmann
2008-01-30 13:25               ` Marcelo Tosatti

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=47A040E3.7000207@redhat.com \
    --to=kraxel-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
    --cc=avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org \
    --cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    --cc=marcelo-Bw31MaZKKs3YtjvyW6yDsg@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