qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: "Alex Bennée" <alex.bennee@linaro.org>,
	"Stefan Hajnoczi" <stefanha@redhat.com>,
	qemu-devel@nongnu.org
Subject: Re: [PATCH v5 10/10] accel/tcg: include cs_base in our hash calculations
Date: Fri, 26 May 2023 09:15:44 -0700	[thread overview]
Message-ID: <fdfdaa79-8d86-64e7-007f-07e424ac0b80@linaro.org> (raw)
In-Reply-To: <20230524133952.3971948-11-alex.bennee@linaro.org>

On 5/24/23 06:39, Alex Bennée wrote:
> We weren't using cs_base in the hash calculations before. Since the
> arm front end moved a chunk of flags in a378206a20 (target/arm: Move
> mode specific TB flags to tb->cs_base) they comprise of an important
> part of the execution state.
> 
> Widen the tb_hash_func to include cs_base and expand to qemu_xxhash8()
> to accommodate it.
> 
> My initial benchmark shows very little difference in the
> runtime.
> 
> Before:
> 
> armhf
> 
> ➜  hyperfine -w 2 -m 20 "./arm-softmmu/qemu-system-arm -cpu cortex-a15 -machine type=virt,highmem=off -display none -m 2048 -serial mon:stdio -netdev user,id=unet,hostfwd=tcp::2222-:22 -device virtio-net-pci,netdev=unet -device virtio-scsi-pci -blockdev driver=raw,node-name=hd,discard=unmap,file.driver=host_device,file.filename=/dev/zen-disk/debian-bullseye-armhf -device scsi-hd,drive=hd -smp 4 -kernel /home/alex/lsrc/linux.git/builds/arm/arch/arm/boot/zImage -append 'console=ttyAMA0 root=/dev/sda2 systemd.unit=benchmark.service' -snapshot"
> Benchmark 1: ./arm-softmmu/qemu-system-arm -cpu cortex-a15 -machine type=virt,highmem=off -display none -m 2048 -serial mon:stdio -netdev user,id=unet,hostfwd=tcp::2222-:22 -device virtio-net-pci,netdev=unet -device virtio-scsi-pci -blockdev driver=raw,node-name=hd,discard=unmap,file.driver=host_device,file.filename=/dev/zen-disk/debian-bullseye-armhf -device scsi-hd,drive=hd -smp 4 -kernel /home/alex/lsrc/linux.git/builds/arm/arch/arm/boot/zImage -append 'console=ttyAMA0 root=/dev/sda2 systemd.unit=benchmark.service' -snapshot
>    Time (mean ± σ):     24.627 s ±  2.708 s    [User: 34.309 s, System: 1.797 s]
>    Range (min … max):   22.345 s … 29.864 s    20 runs
> 
> arm64
> 
> ➜  hyperfine -w 2 -n 20 "./qemu-system-aarch64 -cpu max,pauth-impdef=on -machine type=virt,virtualization=on,gic-version=3 -display none -serial mon:stdio -netdev user,id=unet,hostfwd=tcp::2222-:22,hostfwd=tcp::1234-:1234 -device virtio-net-pci,netdev=unet -device virtio-scsi-pci -blockdev driver=raw,node-name=hd,discard=unmap,file.driver=host_device,file.filename=/dev/zen-disk/debian-bullseye-arm64 -device scsi-hd,drive=hd -smp 4 -kernel ~/lsrc/linux.git/builds/arm64/arch/arm64/boot/Image.gz -append 'console=ttyAMA0 root=/dev/sda2 systemd.unit=benchmark-pigz.service' -snapshot"
> Benchmark 1: 20
>    Time (mean ± σ):     62.559 s ±  2.917 s    [User: 189.115 s, System: 4.089 s]
>    Range (min … max):   59.997 s … 70.153 s    10 runs
> 
> After:
> 
> armhf
> 
> Benchmark 1: ./arm-softmmu/qemu-system-arm -cpu cortex-a15 -machine type=virt,highmem=off -display none -m 2048 -serial mon:stdio -netdev user,id=unet,hostfwd=tcp::2222-:22 -device virtio-net-pci,netdev=unet -device virtio-scsi-pci -blockdev driver=raw,node-name=hd,discard=unmap,file.driver=host_device,file.filename=/dev/zen-disk/debian-bullseye-armhf -device scsi-hd,drive=hd -smp 4 -kernel /home/alex/lsrc/linux.git/builds/arm/arch/arm/boot/zImage -append 'console=ttyAMA0 root=/dev/sda2 systemd.unit=benchmark.service' -snapshot
>    Time (mean ± σ):     24.223 s ±  2.151 s    [User: 34.284 s, System: 1.906 s]
>    Range (min … max):   22.000 s … 28.476 s    20 runs
> 
> arm64
> 
> hyperfine -w 2 -n 20 "./qemu-system-aarch64 -cpu max,pauth-impdef=on -machine type=virt,virtualization=on,gic-version=3 -display none -serial mon:stdio -netdev user,id=unet,hostfwd=tcp::2222-:22,hostfwd=tcp::1234-:1234 -device virtio-net-pci,netdev=unet -device virtio-scsi-pci -blockdev driver=raw,node-name=hd,discard=unmap,file.driver=host_device,file.filename=/dev/zen-disk/debian-bullseye-arm64 -device scsi-hd,drive=hd -smp 4 -kernel ~/lsrc/linux.git/builds/arm64/arch/arm64/boot/Image.gz -append 'console=ttyAMA0 root=/dev/sda2 systemd.unit=benchmark-pigz.service' -snapshot"
> Benchmark 1: 20
>    Time (mean ± σ):     62.769 s ±  1.978 s    [User: 188.431 s, System: 5.269 s]
>    Range (min … max):   60.285 s … 66.868 s    10 runs
> 
> Signed-off-by: Alex Bennée<alex.bennee@linaro.org>
> Message-Id:<20230523125000.3674739-11-alex.bennee@linaro.org>

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~


      reply	other threads:[~2023-05-26 16:16 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-24 13:39 [PATCH v5 00/10] tracing: remove dynamic vcpu state Alex Bennée
2023-05-24 13:39 ` [PATCH v5 01/10] *-user: remove the guest_user_syscall tracepoints Alex Bennée
2023-05-24 13:39 ` [PATCH v5 02/10] trace-events: remove the remaining vcpu trace events Alex Bennée
2023-05-24 13:39 ` [PATCH v5 03/10] trace: remove vcpu_id from the TraceEvent structure Alex Bennée
2023-05-24 13:39 ` [PATCH v5 04/10] scripts/qapi: document the tool that generated the file Alex Bennée
2023-05-24 13:56   ` Philippe Mathieu-Daudé
2023-05-25 11:19   ` Markus Armbruster
2023-05-25 19:25   ` Stefan Hajnoczi
2023-05-24 13:39 ` [PATCH v5 05/10] qapi: make the vcpu parameters deprecated for 8.1 Alex Bennée
2023-05-25 11:36   ` Markus Armbruster
2023-05-25 12:43     ` Alex Bennée
2023-05-24 13:39 ` [PATCH v5 06/10] trace: remove code that depends on setting vcpu Alex Bennée
2023-05-24 13:39 ` [PATCH v5 07/10] trace: remove control-vcpu.h Alex Bennée
2023-05-24 13:39 ` [PATCH v5 08/10] tcg: remove the final vestiges of dstate Alex Bennée
2023-05-24 13:39 ` [PATCH v5 09/10] hw/9pfs: use qemu_xxhash4 Alex Bennée
2023-05-24 13:39 ` [PATCH v5 10/10] accel/tcg: include cs_base in our hash calculations Alex Bennée
2023-05-26 16:15   ` Richard Henderson [this message]

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=fdfdaa79-8d86-64e7-007f-07e424ac0b80@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=alex.bennee@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@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).