Messages in this thread | | | Date | Tue, 5 Sep 2017 10:07:26 +0200 | From | Peter Zijlstra <> | Subject | Re: [PATCH resend] x86,kvm: Add a kernel parameter to disable PV spinlock |
| |
On Tue, Sep 05, 2017 at 08:57:16AM +0200, Oscar Salvador wrote: > It may be that the original patch was just to keep consistency between Xen > and KVM, and also only for testing purposes. > But we find a case when a customer of ours is running some workloads with > 1<->1 mapping between physical cores and virtual cores, and we realized that > with the pv spinlocks disabled there is a 4-5% of performance gain.
There are very definite downsides to using a test-and-set spinlock.
A much better option would be one that forces the use of native qspinlock in the 1:1 case. That means you have to fail both pv_enabled() and virt_spin_lock().
| |