From e0bf43d64ed01285321bf6c3a308f699c5483efc Mon Sep 17 00:00:00 2001 From: Tino Reichardt Date: Sat, 12 Oct 2024 09:54:50 +0200 Subject: [PATCH] ZTS: Make use of optimal CPU pinning With CPU pinning, we should get some speedup because of better cpu cache re-use. Reviewed-by: George Melikov Reviewed-by: Brian Behlendorf Signed-off-by: Tino Reichardt Closes #16641 --- .github/workflows/scripts/qemu-5-setup.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/scripts/qemu-5-setup.sh b/.github/workflows/scripts/qemu-5-setup.sh index 5034c1896..bc40e8894 100755 --- a/.github/workflows/scripts/qemu-5-setup.sh +++ b/.github/workflows/scripts/qemu-5-setup.sh @@ -18,10 +18,12 @@ sudo virsh undefine openzfs VMs=2 CPU=2 -# definitions of per operating system +# cpu pinning +CPUSET=("0,1" "2,3") + case "$OS" in - # FreeBSD can't be optimized via ksmtuned freebsd*) + # FreeBSD can't be optimized via ksmtuned RAM=6 ;; *) @@ -75,6 +77,7 @@ EOF --cpu host-passthrough \ --virt-type=kvm --hvm \ --vcpus=$CPU,sockets=1 \ + --cpuset=${CPUSET[$((i-1))]} \ --memory $((1024*RAM)) \ --memballoon model=virtio \ --graphics none \