qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Julian Ganz" <neither@nut.email>
To: "BALATON Zoltan" <balaton@eik.bme.hu>
Cc: qemu-devel@nongnu.org, "Alex Bennée" <alex.bennee@linaro.org>
Subject: Re: [PATCH v6 00/25] tcg-plugins: add hooks for discontinuities
Date: Fri, 05 Sep 2025 23:28:01 +0000	[thread overview]
Message-ID: <3c8d0c3733edc984937ac33a417488f92dccb148@nut.email> (raw)
In-Reply-To: <df0a8c4b-ae9b-1582-1570-6cb588149a7a@eik.bme.hu>

September 5, 2025 at 9:25 PM, "BALATON Zoltan" wrote:
> On Fri, 5 Sep 2025, Julian Ganz wrote:
> > September 5, 2025 at 1:38 PM, "BALATON Zoltan" wrote:
> > > Have you done any testing on how much overhead this adds
> > >  to interrupt heavy guest workloads? At least for PPC these are already
> > >  much slower than real CPU so I'd like it to get faster not slower.
> > > 
> >  No, I have not made any performance measurements. However, given that
> >  for every single TB execution a similar hook is called already, the
> >  impact related to other existing plugin infrastructure _should_ be
> >  neglectible.
> > 
> >  That is, if your workload actually runs any code and is not constantly
> >  bombarded with interrupts that _do_ result in a trap (which _may_ happen
> >  during some tests).
> > 
> >  So if you are performance sensitive enough to care, you will very likely
> >  want to disable plugins anyway.
> > 
> I can disable plugins and do that normally but that does not help those who get QEMU from their distro (i.e. most users). If this infrastructure was disabled in default builds and needed an explicit option to enable then those who need it could enable it and not imposed it on everyone else who just get a default build from a distro and never use plugins. Having an option which needs rebuild is like not having the option for most people. I guess the question is which is the larger group? Those who just run guests or those who use this instrumentation with plugins.

Hard to say.

> The default may better be what the larger group needs. Even then distros may still change the default so it would be best if the overhead can be minimised even if enabled. I think the log infrastructure does that, would a similar solution work here?
> 
> For testing I've found that because embedded PPC CPUs have a software controlled MMU (and in addition to that QEMU may flush TLB entries too often) running something that does a lot of memory access like runnung the STREAM benchmark on sam460ex is hit by this IIRC but anything else causing a lot of interrupts like reading from emulated disk or sound is probably affected as well. I've tried to optimise PPC exception handling a bit before but whenever I optimise something it is later undone by other changes not caring about performance.

I could try running the benchmark on multiple versions:

* qemu with plugins disabled,
* with plugins enabled but without these patches and
* with plugins enabled and with these patches.

However, I'll likely only report back with results next week, though.
Do you happen to have an image you can point me to? Either something
that has the benchmark already or some unixoid running on the platform?
I'm currently not motivated enough to cook up some bare-metal testbed
for a platform I'm not familiar with.

Regards,
Julian


  reply	other threads:[~2025-09-05 23:30 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-04 20:46 [PATCH v6 00/25] tcg-plugins: add hooks for discontinuities Julian Ganz
2025-09-04 20:46 ` [PATCH v6 01/25] plugins: add types for callbacks related to certain discontinuities Julian Ganz
2025-09-04 20:46 ` [PATCH v6 02/25] plugins: add API for registering discontinuity callbacks Julian Ganz
2025-09-04 20:46 ` [PATCH v6 03/25] plugins: add hooks for new discontinuity related callbacks Julian Ganz
2025-09-22 11:34   ` Philippe Mathieu-Daudé
2025-09-22 20:57     ` Julian Ganz
2025-09-04 20:46 ` [PATCH v6 04/25] contrib/plugins: add plugin showcasing new dicontinuity related API Julian Ganz
2025-09-04 20:46 ` [PATCH v6 05/25] target/alpha: call plugin trap callbacks Julian Ganz
2025-09-04 20:46 ` [PATCH v6 06/25] target/arm: " Julian Ganz
2025-09-04 20:46 ` [PATCH v6 07/25] target/avr: " Julian Ganz
2025-09-04 20:46 ` [PATCH v6 08/25] target/hppa: " Julian Ganz
2025-09-22 11:38   ` Philippe Mathieu-Daudé
2025-09-22 21:09     ` Julian Ganz
2025-09-04 20:46 ` [PATCH v6 09/25] target/i386: " Julian Ganz
2025-09-04 20:46 ` [PATCH v6 10/25] target/loongarch: " Julian Ganz
2025-09-04 20:46 ` [PATCH v6 11/25] target/m68k: " Julian Ganz
2025-09-04 20:46 ` [PATCH v6 12/25] target/microblaze: " Julian Ganz
2025-09-04 20:46 ` [PATCH v6 13/25] target/mips: " Julian Ganz
2025-09-22 11:45   ` Philippe Mathieu-Daudé
2025-09-04 20:46 ` [PATCH v6 14/25] target/openrisc: " Julian Ganz
2025-09-04 20:46 ` [PATCH v6 15/25] target/ppc: " Julian Ganz
2025-09-04 20:46 ` [PATCH v6 16/25] target/riscv: " Julian Ganz
2025-09-04 20:46 ` [PATCH v6 17/25] target/rx: " Julian Ganz
2025-09-07 14:20   ` yoshinori.sato
2025-09-04 20:46 ` [PATCH v6 18/25] target/s390x: " Julian Ganz
2025-09-04 20:46 ` [PATCH v6 19/25] target/sh4: " Julian Ganz
2025-09-07 14:20   ` yoshinori.sato
2025-09-04 20:46 ` [PATCH v6 20/25] target/sparc: " Julian Ganz
2025-09-04 20:48   ` Julian Ganz
2025-09-04 20:48 ` [PATCH v6 21/25] target/tricore: " Julian Ganz
2025-09-04 20:48 ` [PATCH v6 22/25] target/xtensa: " Julian Ganz
2025-09-22 11:47   ` Philippe Mathieu-Daudé
2025-09-22 21:12     ` Julian Ganz
2025-09-04 20:48 ` [PATCH v6 23/25] tests: add plugin asserting correctness of discon event's to_pc Julian Ganz
2025-09-21 16:46   ` Alex Bennée
2025-09-22 10:11     ` Julian Ganz
2025-09-22 10:15       ` Daniel P. Berrangé
2025-09-23 20:29       ` Julian Ganz
2025-09-24 15:31         ` Julian Ganz
2025-09-25 10:41           ` Alex Bennée
2025-09-25 12:42             ` Julian Ganz
2025-09-04 20:48 ` [PATCH v6 24/25] tests: add test for double-traps on rv64 Julian Ganz
2025-09-04 20:49 ` [PATCH v6 25/25] tests: add test with interrupted memory accesses " Julian Ganz
2025-09-05 11:38 ` [PATCH v6 00/25] tcg-plugins: add hooks for discontinuities BALATON Zoltan
2025-09-05 12:20   ` Alex Bennée
2025-09-05 13:43   ` Julian Ganz
2025-09-05 19:25     ` BALATON Zoltan
2025-09-05 23:28       ` Julian Ganz [this message]
2025-09-07 20:21         ` BALATON Zoltan
2025-09-08 20:51           ` Julian Ganz
2025-09-09 19:48           ` Julian Ganz
2025-09-10 10:06             ` BALATON Zoltan
2025-09-10 11:41               ` Julian Ganz
2025-09-10 12:09                 ` Alex Bennée
2025-09-10 15:04                   ` BALATON Zoltan
2025-09-22 11:31 ` Philippe Mathieu-Daudé
2025-09-22 20:54   ` Julian Ganz

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=3c8d0c3733edc984937ac33a417488f92dccb148@nut.email \
    --to=neither@nut.email \
    --cc=alex.bennee@linaro.org \
    --cc=balaton@eik.bme.hu \
    --cc=qemu-devel@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 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).