On Fri, 23 Jul 2021 at 13:41, Zeng Guang <guang.zeng@xxxxxxxxx> wrote:
--------------------------------------
IPI microbenchmark:
(https://lore.kernel.org/kvm/20171219085010.4081-1-ynorov@xxxxxxxxxxxxxxxxxx)
2 vCPUs, 1:1 pin vCPU to pCPU, guest VM runs with idle=poll, x2APIC mode
Improve the performance for unicast ipi is as expected, however, I
wonder whether the broadcast performance is worse than PV
IPIs/Thomas's IPI shorthands(IPI shorthands are supported by upstream
linux apic/x2apic driver). The hardware acceleration is not always
outstanding on AMD(https://lore.kernel.org/kvm/CANRm+Cx597FNRUCyVz1D=B6Vs2GX3Sw57X7Muk+yMpi_hb+v1w@xxxxxxxxxxxxxx/),
how about your Intel guys? Please try a big VM at least 96 vCPUs as
below or more bigger.
Result with IPIv enabled:Good to know this.
Dry-run: 0, 272798 ns
Self-IPI: 5094123, 11114037 ns
Normal IPI: 131697087, 173321200 ns
Broadcast IPI: 0, 155649075 ns
Broadcast lock: 0, 161518031 ns
Result with IPIv disabled:
Dry-run: 0, 272766 ns
Self-IPI: 5091788, 11123699 ns
Normal IPI: 145215772, 174558920 ns
Broadcast IPI: 0, 175785384 ns
Broadcast lock: 0, 149076195 ns
As IPIv can benefit unicast IPI to other CPU, Noraml IPI test case gain
about 9.73% time saving on average out of 15 test runs when IPIv is
enabled.
w/o IPIv w/ IPIv
Normal IPI: 145944306.6 ns 131742993.1 ns
%Reduction -9.73%
--------------------------------------
hackbench:
8 vCPUs, guest VM free run, x2APIC mode
./hackbench -p -l 100000
w/o IPIv w/ IPIv
Time: 91.887 74.605
%Reduction: -18.808%
96 vCPUs, guest VM free run, x2APIC mode
./hackbench -p -l 1000000
w/o IPIv w/ IPIv
Time: 287.504 235.185
%Reduction: -18.198%
Wanpeng