Alex Bennée
367189efae
accel/tcg: include cs_base in our hash calculations
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>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20230526165401.574474-12-alex.bennee@linaro.org
Message-Id: <20230524133952.3971948-11-alex.bennee@linaro.org>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2023-06-01 11:05:05 -04:00
..
2023-05-30 17:37:26 +02:00
2023-05-30 17:37:26 +02:00
2023-05-10 14:15:13 +02:00
2023-05-30 17:37:26 +02:00
2017-02-21 11:14:07 +00:00
2023-05-16 09:14:18 +02:00
2023-05-30 17:37:26 +02:00
2022-03-07 13:16:49 +00:00
2020-11-15 17:04:40 +01:00
2022-11-21 11:58:10 +01:00
2023-03-20 12:43:50 +01:00
2020-10-23 13:42:16 +01:00
2020-10-23 13:42:16 +01:00
2020-11-15 17:04:40 +01:00
2023-05-23 16:51:13 -07:00
2023-02-21 08:53:03 -10:00
2022-05-03 15:18:14 +04:00
2022-04-06 14:31:55 +02:00
2022-05-04 15:55:23 +02:00
2023-05-18 08:53:52 +02:00
2023-05-23 16:51:18 -07:00
2023-05-23 16:49:33 -07:00
2023-05-23 15:20:15 +08:00
2021-01-24 20:10:54 +01:00
2023-01-06 00:51:02 +01:00
2020-01-06 18:41:32 +04:00
2020-07-13 14:36:10 +01:00
2023-03-20 12:43:50 +01:00
2023-01-11 10:44:34 +01:00
2023-04-06 12:38:42 -04:00
2022-05-03 15:17:56 +04:00
2022-04-06 14:31:55 +02:00
2023-05-30 17:37:26 +02:00
2023-05-30 17:37:26 +02:00
2023-05-30 17:37:26 +02:00
2021-02-07 20:38:20 +00:00
2020-11-15 17:04:40 +01:00
2020-11-15 17:04:40 +01:00
2020-06-26 06:45:29 -04:00
2023-02-27 22:29:01 +01:00
2023-02-17 14:34:24 +01:00
2022-04-06 14:31:43 +02:00
2022-06-20 08:38:58 -03:00
2021-03-09 21:47:45 +01:00
2023-02-04 06:19:42 -10:00
2022-12-20 17:09:41 -08:00
2022-10-12 19:22:01 +04:00
2022-09-02 10:22:39 +08:00
2022-04-21 17:03:51 +04:00
2020-09-23 16:07:44 +01:00
2023-03-08 00:37:48 +01:00
2023-05-30 17:37:26 +02:00
2022-03-07 13:16:49 +00:00
2019-09-11 08:46:17 +02:00
2023-05-23 16:51:18 -07:00
2023-04-24 11:29:00 +02:00
2022-11-06 09:48:50 +01:00
2019-09-24 12:18:47 +01:00
2020-12-10 17:16:44 +01:00
2023-01-09 13:50:47 +01:00
2023-03-13 15:23:37 +04:00
2023-05-28 13:08:25 +04:00
2019-06-24 22:19:30 +02:00
2016-08-03 18:44:56 +02:00
2021-06-25 14:24:24 +03:00
2022-06-29 10:56:12 +03:00
2023-02-23 13:56:14 +01:00
2023-05-30 17:37:26 +02:00
2023-03-07 12:39:53 +01:00
2023-01-19 10:18:28 +01:00
2023-04-20 11:17:35 +02:00
2021-10-15 16:11:22 +02:00
2020-10-09 07:08:19 +02:00
2022-04-06 14:31:43 +02:00
2023-03-13 15:39:31 +04:00
2018-12-20 10:29:08 +01:00
2023-03-07 12:38:40 +01:00
2023-03-07 12:38:40 +01:00
2021-01-18 10:05:06 +00:00
2022-06-21 09:24:34 -07:00
2023-02-02 11:48:20 +00:00
2023-06-01 11:05:05 -04:00
2023-03-28 15:23:10 -07:00
2019-01-30 10:51:20 +01:00
2023-05-08 11:10:49 +02:00
2023-02-04 07:56:54 +01:00
2021-07-26 07:06:49 -10:00
2023-04-27 16:39:43 +02:00
2018-04-05 14:37:38 +02:00
2023-05-03 14:00:08 -05:00
2022-12-14 16:19:35 +01:00
2023-04-25 13:17:28 +02:00
2021-01-08 15:13:38 +00:00
2016-05-18 15:04:27 +03:00
2023-04-28 11:31:07 +02:00
2020-08-21 06:18:24 -04:00
2021-11-16 09:43:44 +01:00
2018-08-24 20:26:37 +02:00
2023-02-27 09:15:39 +01:00
2023-02-11 16:51:09 +01:00
2019-06-12 13:20:20 +02:00
2023-05-24 09:21:22 +02:00
2023-05-30 17:37:26 +02:00
2021-04-01 15:27:44 +04:00