lkml.org 
[lkml]   [2022]   [Aug]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH] KVM: x86: use TPAUSE to replace PAUSE in halt polling
Date
> From: Paolo Bonzini <pbonzini@redhat.com>
> Sent: Friday, August 26, 2022 6:14 PM
> To: Mi, Dapeng1 <dapeng1.mi@intel.com>; Christopherson,, Sean
> <seanjc@google.com>
> Cc: rafael@kernel.org; daniel.lezcano@linaro.org; linux-pm@vger.kernel.org;
> linux-kernel@vger.kernel.org; kvm@vger.kernel.org;
> zhenyuw@linux.intel.com
> Subject: Re: [PATCH] KVM: x86: use TPAUSE to replace PAUSE in halt polling
>
> 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?

Sorry, I may not describe the test case clearly. The hackbench and schbench are run on Host
rather than a VM. When the hackbench or schbench is run on Host, there is a FIO workload running
in a VM in the background and the FIO would trigger a large number of HLT VM-exits and eventually
invoke halt polling.

In this test, I want to check whether potential polling time extending would increase the scheduling
latency on host. But it looks the impact for scheduling latency is quite minimal.

>
> 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.
>

Here are the netperf's UDP_RR test result between two VMs locate on two different physical machines.

Netperf Vanilla (Avg.) TPAUSE (Avg.) %Delta
UDP_RR (Trans. Rate/s) 503.8 503.9 0.02%

It looks there is no obvious difference with TPAUSE change on UDP RR test.


> Paolo

\
 
 \ /
  Last update: 2022-08-30 07:58    [W:0.070 / U:0.160 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site