All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: Alexander Graf <agraf@suse.de>
Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [Qemu-ppc] [PATCH] ppcr: Avoid decrementer related kvm exits
Date: Fri, 14 Oct 2011 17:36:31 +1100	[thread overview]
Message-ID: <20111014063631.GD4580@truffala.fritz.box> (raw)
In-Reply-To: <EFBE2537-276B-4790-B3B4-45C9EB169585@suse.de>

On Fri, Oct 14, 2011 at 07:30:09AM +0200, Alexander Graf wrote:
> 
> On 14.10.2011, at 07:19, David Gibson wrote:
> 
> > In __cpu_ppc_store_decr(), we set up a regular timer used to trigger
> > decrementer interrupts.  This is necessary to implement the decrementer
> > properly under TCG, but is unnecessary under KVM (true for both Book3S-PR
> > and Book3S-HV KVM variants), because the kernel handles generating and
> > delivering decrementer exceptions.
> > 
> > Under kvm, in fact, the timer causes expensive and unnecessary exits from
> > kvm to qemu.  This patch, therefore, disables setting the timer when kvm
> > is in use.
> > 
> > Signed-off-by: Anton Blanchard <anton@au1.ibm.com>
> > Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
> > ---
> > hw/ppc.c |   25 ++++++++++++++-----------
> > 1 files changed, 14 insertions(+), 11 deletions(-)
> > 
> > diff --git a/hw/ppc.c b/hw/ppc.c
> > index 25b59dd..87aa4e5 100644
> > --- a/hw/ppc.c
> > +++ b/hw/ppc.c
> > @@ -658,21 +658,24 @@ static void __cpu_ppc_store_decr (CPUState *env, uint64_t *nextp,
> 
> Do we ever call store_decr in the kvm case? Isn't that only called
> from emulated mtdec?

Yes, from cpu_ppc_set_tb_clk().  Anton observed the kvm exits in the
wild, they're not theoretical.

Agh, which reminds me, I forgot to fixup the git author again.  The
patch should show authorship by Anton Blanchard <anton@au1.ibm.com>,
as in the s-o-b.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

  reply	other threads:[~2011-10-14  6:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-14  5:19 [Qemu-devel] [PATCH] ppcr: Avoid decrementer related kvm exits David Gibson
2011-10-14  5:30 ` Alexander Graf
2011-10-14  6:36   ` David Gibson [this message]
2011-10-14  6:44     ` [Qemu-devel] [Qemu-ppc] " Alexander Graf
2011-10-14  6:46       ` David Gibson
2011-10-17  5:25         ` David Gibson
2011-10-25 19:38       ` Scott Wood
2011-10-28  7:27         ` Alexander Graf

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=20111014063631.GD4580@truffala.fritz.box \
    --to=david@gibson.dropbear.id.au \
    --cc=agraf@suse.de \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.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 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.