lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 25 Aug 2022 12:16:06 +0000
From:   "Mi, Dapeng1" <dapeng1.mi@...el.com>
To:     Paolo Bonzini <pbonzini@...hat.com>,
        "Christopherson,, Sean" <seanjc@...gle.com>
CC:     "rafael@...nel.org" <rafael@...nel.org>,
        "daniel.lezcano@...aro.org" <daniel.lezcano@...aro.org>,
        "linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "kvm@...r.kernel.org" <kvm@...r.kernel.org>,
        "zhenyuw@...ux.intel.com" <zhenyuw@...ux.intel.com>
Subject: RE: [PATCH] KVM: x86: use TPAUSE to replace PAUSE in halt polling

> From: Paolo Bonzini <pbonzini@...hat.com>
> Sent: Thursday, August 25, 2022 1:19 AM
> To: Christopherson,, Sean <seanjc@...gle.com>; Mi, Dapeng1
> <dapeng1.mi@...el.com>
> Cc: rafael@...nel.org; daniel.lezcano@...aro.org; linux-pm@...r.kernel.org;
> linux-kernel@...r.kernel.org; kvm@...r.kernel.org; zhenyuw@...ux.intel.com
> Subject: Re: [PATCH] KVM: x86: use TPAUSE to replace PAUSE in halt polling
> 
> On 8/24/22 17:26, Sean Christopherson 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.
> 
> Yeah, halt polling works around perhaps the biggest performance issue with VMs
> compared to bare metal (so much that it's even possible to move halt polling
> _inside_ the guest for extra performance).
> 
> I am ready to be proven wrong but I doubt TPAUSE will have a small effect, and
> if one wants the most power saving they should disable halt polling.  Perhaps
> KVM could do it automatically if the powersaving governor is in effect?

Paolo, 

In our tests, we see halt polling consumes too much CPU resources and power. For example, In video playback case,
The CPU utilization of halt polling is 17% and brings 7% extra power consumption comparing with disabling halt polling.

Halt polling seems to consume too much cpu resource and power than imagine, especially for Client platform, it make things worse.
Base on our observation, TPAUSE could improve 1% ~ 2% power saving. Disabling halt polling is another alternative method we are thinking.
Base on our tests, we don't see there are obvious performance downgrade even for FIO and netperf on Intel Alderlake platform. It looks 
the context switch latency could not be so large on the latest CPU. 

Yes, you are right, it could be a better method to make KVM enable/disable halt polling base on the CPU performance governor. 

> 
> Paolo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ