On 5/5/23 17:53, Alex Bennée wrote:
Now we no longer have dynamic state affecting things we can remove the
additional fields in cpu.h and simplify the TB hash calculation.

For the benchmark:

     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"

It has a marginal effect on runtime, before:

   Time (mean ± σ):     26.279 s ±  2.438 s    [User: 41.113 s, System: 1.843 s]
   Range (min … max):   24.420 s … 32.565 s    20 runs

after:

   Time (mean ± σ):     24.440 s ±  2.885 s    [User: 34.474 s, System: 2.028 s]
   Range (min … max):   21.663 s … 29.937 s    20 runs

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1358
Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com>
Reviewed-by: Richard Henderson <richard.hender...@linaro.org>
Signed-off-by: Alex Bennée <alex.ben...@linaro.org>
Message-Id: <20230503091756.1453057-9-alex.ben...@linaro.org>
---
  accel/tcg/tb-hash.h       | 6 +++---
  include/exec/exec-all.h   | 3 ---
  include/hw/core/cpu.h     | 5 -----
  accel/tcg/cpu-exec.c      | 7 +------
  accel/tcg/tb-maint.c      | 5 ++---
  accel/tcg/translate-all.c | 6 ------
  6 files changed, 6 insertions(+), 26 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <phi...@linaro.org>


Reply via email to