linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Davidlohr Bueso <dave@gnu.org>
To: Avi Kivity <avi@redhat.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>, KVM <kvm@vger.kernel.org>,
	lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] KVM: VMX: invalidate vpid for invlpg instruction
Date: Wed, 05 Sep 2012 23:54:21 +0200	[thread overview]
Message-ID: <1346882061.6304.17.camel@offbook> (raw)
In-Reply-To: <50447442.2050307@redhat.com>

On Mon, 2012-09-03 at 12:11 +0300, Avi Kivity wrote:
> On 09/03/2012 02:27 AM, Davidlohr Bueso wrote:
> > On Fri, 2012-08-31 at 14:37 -0300, Marcelo Tosatti wrote:
> >> On Fri, Aug 31, 2012 at 06:10:48PM +0200, Davidlohr Bueso wrote:
> >> > For processors that support VPIDs we should invalidate the page table entry
> >> > specified by the lineal address. For this purpose add support for individual
> >> > address invalidations.
> >> 
> >> Not necessary - a single context invalidation is performed through
> >> KVM_REQ_TLB_FLUSH.
> > 
> > Since vpid_sync_context() supports both single and all-context vpid
> > invalidations, wouldn't it make sense to also add individual address
> > ones as well, supporting further granularity?
> 
> It might.  Do you have benchmarks supporting this?
> 

I ran two benchmarks: Java Dacapo[1] Sunflow (renders a set of images
using ray tracing) and a vanilla 3.2 kernel build (with 1 job and -j8).

The host configuration is an Intel i7-2635QM (4 cores + HT) with 4Gb RAM
running Linus's latest and only running standard system daemons. For KVM
I disabled EPT.
The guest configuration is a 64bit 4 core 4Gb RAM, running Linux 3.2
(debian) and only running the benchmark.

All results represent the mean of 5 runs, with time(1).

Dacapo without individual addr invvpid:
real   1m25.406s
user   4m59.315s
sys    1m25.406s

Dacapo with individual addr invvpid:
real   1m4.421s
user   3m47.150s
sys    0m1.592s

--

vanilla kernel build without individual addr invvpid:
real   16m42.571s
user   13m28.975s
sys    2m54.487s

vanilla kernel build with individual addr invvpid:
real   15m45.789s
user   12m25.691s
sys    2m44.806s

--

vanilla kernel build (-j8) without individual addr invvpid:
real   10m32.276s
user   33m47.687s
sys    5m37.725s

vanilla kernel build (-j8) with individual addr invvpid:
real   8m29.789s
user   28m12.850s
sys    4m34.353s


In all cases using individual address invalidation outperforms single
context ones regarding wall time. Comments?

[1] http://dacapobench.org/


Thanks,
Davidlohr


  reply	other threads:[~2012-09-05 21:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-31 16:10 [PATCH] KVM: VMX: invalidate vpid for invlpg instruction Davidlohr Bueso
2012-08-31 17:37 ` Marcelo Tosatti
2012-09-02 23:27   ` Davidlohr Bueso
2012-09-03  9:11     ` Avi Kivity
2012-09-05 21:54       ` Davidlohr Bueso [this message]
2012-09-06  8:05         ` 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=1346882061.6304.17.camel@offbook \
    --to=dave@gnu.org \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).