Re: [PATCH] KVM: x86: use TPAUSE to replace PAUSE in halt polling

From: Paolo Bonzini
Date: Fri Aug 26 2022 - 06:14:41 EST


On 8/25/22 13:31, Mi, Dapeng1 wrote:
I say "if", because I think this needs to come with performance numbers to show
the impact on guest latency so that KVM and its users can make an informed
decision.
And if it's unlikely that anyone will ever want to enable TPAUSE for halt polling,
then it's not worth the extra complexity in KVM.
I ever run two scheduling related benchmarks, hackbench and schbench, I didn't see there are obvious performance impact.

Here are the hackbench and schbench data on Intel ADL platform.

Can you confirm (using debugfs for example) that halt polling is used while hackbench is running, and not used while it is not running?

In particular, I think you need to run the server and client on different VMs, for example using netperf's UDP_RR test. With hackbench the ping-pong is simply between two tasks on the same CPU, and the hypervisor is not exercised at all.

Paolo