qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: "Julian Ganz" <neither@nut.email>
Cc: "BALATON Zoltan" <balaton@eik.bme.hu>,  qemu-devel@nongnu.org
Subject: Re: [PATCH v6 00/25] tcg-plugins: add hooks for discontinuities
Date: Wed, 10 Sep 2025 13:09:03 +0100	[thread overview]
Message-ID: <87ldmm5x28.fsf@draig.linaro.org> (raw)
In-Reply-To: <71a535f9154ddc269c0a948053e39053550bd8c0@nut.email> (Julian Ganz's message of "Wed, 10 Sep 2025 11:41:15 +0000")

"Julian Ganz" <neither@nut.email> writes:

> September 10, 2025 at 12:06 PM, "BALATON Zoltan" wrote:
>> On Tue, 9 Sep 2025, Julian Ganz wrote:
>> > I ran streamPPCpowerpcO3 on qemu with these patches:
>> > 
>> >  -------------------------------------------------------------
>> >  Function Best Rate MB/s Avg time Min time Max time
>> >  Copy: 2867.6 0.056828 0.055795 0.061792
>> >  Scale: 1057.5 0.153282 0.151305 0.158115
>> >  Add: 1308.8 0.187095 0.183380 0.193672
>> >  Triad: 1111.6 0.220863 0.215902 0.230440
>> >  -------------------------------------------------------------
>> > 
>> >  After doing a clean build, with the fans still audible:
>> > 
>> >  -------------------------------------------------------------
>> >  Function Best Rate MB/s Avg time Min time Max time
>> >  Copy: 2932.9 0.055131 0.054554 0.055667
>> >  Scale: 1067.9 0.151520 0.149832 0.155000
>> >  Add: 1324.9 0.184807 0.181150 0.191386
>> >  Triad: 1122.0 0.220080 0.213896 0.229302
>> >  -------------------------------------------------------------
>> > 
>> What was different between the above two runs? I guess maybe one is with plugins disabled but it's not clear from the description.
>
> The difference is nothing but a a clean rebuild of qemu. As you see
> there are fluctuations already. Plugins are enabled for both cases.
>
>> > On qemu (6a9fa5ef3230a7d51e0d953a59ee9ef10af705b8) without these
>> >  patches, but plugins enabled:
>> > 
>> >  -------------------------------------------------------------
>> >  Function Best Rate MB/s Avg time Min time Max time
>> >  Copy: 2972.1 0.054407 0.053834 0.054675
>> >  Scale: 1068.6 0.151503 0.149726 0.154594
>> >  Add: 1327.6 0.185160 0.180784 0.193181
>> >  Triad: 1127.2 0.219249 0.212915 0.229230
>> >  -------------------------------------------------------------
>> > 
>> >  And on qemu (6a9fa5ef3230a7d51e0d953a59ee9ef10af705b8) without these
>> >  patches, with plugins disabled:
>> > 
>> >  -------------------------------------------------------------
>> >  Function Best Rate MB/s Avg time Min time Max time
>> >  Copy: 2983.4 0.055141 0.053630 0.060013
>> >  Scale: 1058.3 0.152353 0.151186 0.155072
>> >  Add: 1323.9 0.184707 0.181279 0.188868
>> >  Triad: 1128.2 0.218674 0.212734 0.230314
>> >  -------------------------------------------------------------
>> > 
>> >  I fail to see any significant indication that these patches, or
>> >  plugins in general, would result in a degredation of performance.
>> > 
>> With worst case Copy test it seems to be about 3.5% (and about 1.7%
>> with plugins disabled?) and should be less than that normally so it
>> does not add much more overhead to plugins than there is already so
>> this should be acceptable. It may still be interesting to see if the
>> overhead with plugins disabled can be avoided with a similar way as
>> logging does it.
>
> The thing is: that's probably just usual fluctuations. As you have seen
> with the first two measurements the values fluctuate quite a bit between
> runs of the test on the very same qemu (assuming that a clean build did
> not incur any _other_ relevant change). For example, the best rate for
> scale shown with plugins enabled is one percent faster than with plugins
> disabled. Is this significant? Probably not. Or at least it doesn't make
> much sense.

I wouldn't spend too much time chasing this down. As you say this
fluctuation is well within the noise range.

I can recommend hyperfine as a runner:

  https://github.com/sharkdp/hyperfine

as it does some work on how many times you need to run a test before the
results are statistically relevant.

> I may do some more tests this week, with runtimes longer than a few
> seconds if I can find the motivation to set up everything I'd need to
> compile your benchmark. In the mean-time, you are welcome to make your
> own measurements if you want to. The patches are also availible at [1]
> if you don't want to apply them to your local tree yourself.

Balton,

I don't think worries about performance impact are justified and Julian
has certainly done enough due diligence here. If you can come up with a
repeatable test that shows a measurable impact then please do so.

>
> Regards,
> Julian
>
> [1]: https://github.com/patchew-project/qemu/tree/patchew/cover.1757018626.git.neither@nut.email

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro


  reply	other threads:[~2025-09-10 12:11 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
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 [this message]
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=87ldmm5x28.fsf@draig.linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=balaton@eik.bme.hu \
    --cc=neither@nut.email \
    --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).