All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>, Richard Henderson <rth@twiddle.net>
Cc: "Stefan Weil" <sw@weilnetz.de>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"QEMU Developers" <qemu-devel@nongnu.org>,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>
Subject: Re: [Qemu-devel] [PATCH] tcg/tci: do not use ldst label (never implemented)
Date: Thu, 21 Sep 2017 11:59:04 +0200	[thread overview]
Message-ID: <125b2e2a-290e-568a-0e33-d40150220912@redhat.com> (raw)
In-Reply-To: <2a90999d-6f79-cbd4-aaba-a6cd425980c6@redhat.com>

On 12.09.2017 17:13, Paolo Bonzini wrote:
> On 12/09/2017 16:56, Thomas Huth wrote:
>> The problem is that the SLOF firmware just performs very badly with TCG
>> (it's fine on real hardware). It executes a lot of Forth code, and the
>> Forth interpreter uses things like computed gotos or other tricks that
>> basically prevent proper JIT operation here. I've done quite a bit of
>> optimizations in SLOF in the past already, but I've got hardly any ideas
>> left how to fix that further.
> 
> Two ideas for QEMU based on a quick "perf record" test:
> 
> - 25% of the time is spent in cpu_exec.  PPC doesn't use
> tcg_gen_lookup_and_goto_ptr.

I just realized that Richard recently already posted a patch for this:

https://lists.gnu.org/archive/html/qemu-devel/2017-06/msg07124.html

I've applied it locally, and indeed, it speeds up a simple test with
-prom-env by factor two. Before the change:

$ time ppc64-softmmu/qemu-system-ppc64 -nographic -vga none -prom-env
'use-nvramrc?=true' -prom-env 'nvramrc=power-off'
[...]
real	0m28.784s
user	0m28.700s
sys	0m0.031s

After the change:

$ time ppc64-softmmu/qemu-system-ppc64 -nographic -vga none -prom-env
'use-nvramrc?=true' -prom-env 'nvramrc=power-off'
[...]
real	0m13.953s
user	0m13.904s
sys	0m0.046s

That's impressive! Richard, may I ask what's the current state of this?
Do you plan to merge this soon, or are there still issues (like the ones
that Paolo mentioned)?

However, I only see that speed-up with the normal x86 backend. I've also
tried it with TCI, but I hardly saw any improvements there ... is there
still something missing in the TCI backend that is required for the
tcg_gen_lookup_and_goto_ptr feature?

 Thomas

  reply	other threads:[~2017-09-21  9:59 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-11  2:28 [Qemu-devel] [PATCH] tcg/tci: do not use ldst label (never implemented) Philippe Mathieu-Daudé
2017-09-11  5:18 ` Stefan Weil
2017-09-11 18:01 ` Richard Henderson
2017-09-11 18:24   ` Peter Maydell
2017-09-11 19:39     ` Stefan Weil
2017-09-11 19:47       ` Philippe Mathieu-Daudé
2017-09-11 19:54         ` Stefan Weil
2017-09-11 20:26     ` Stefan Weil
2017-09-11 21:06       ` Philippe Mathieu-Daudé
2017-09-12  8:52     ` Stefan Weil
2017-09-12  9:20       ` Stefan Weil
2017-09-12 14:56         ` Thomas Huth
2017-09-12 15:13           ` Paolo Bonzini
2017-09-21  9:59             ` Thomas Huth [this message]
2017-09-22 13:31               ` Richard Henderson
2017-09-11 18:13 ` Philippe Mathieu-Daudé
2017-09-11 18:14   ` Peter Maydell

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=125b2e2a-290e-568a-0e33-d40150220912@redhat.com \
    --to=thuth@redhat.com \
    --cc=f4bug@amsat.org \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=rth@twiddle.net \
    --cc=sw@weilnetz.de \
    /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.