Thread (5 messages) 5 messages, 2 authors, 2017-10-02

Re: [PATCH v3 0/2] guard virt_spin_lock() with a static key

From: Peter Zijlstra <peterz@infradead.org>
Date: 2017-10-02 14:20:48
Also in: lkml

On Wed, Sep 06, 2017 at 07:36:23PM +0200, Juergen Gross wrote:
With virt_spin_lock() being guarded by a static key the bare metal case
can be optimized by patching the call away completely. In case a kernel
running as a guest it can decide whether to use paravitualized
spinlocks, the current fallback to the unfair test-and-set scheme, or
to mimic the bare metal behavior.

V3:
- remove test for hypervisor environment from virt_spin_lock(9 as
  suggested by Waiman Long

V2:
- use static key instead of making virt_spin_lock() a pvops function

Juergen Gross (2):
  paravirt/locks: use new static key for controlling call of
    virt_spin_lock()
  paravirt,xen: correct xen_nopvspin case

 arch/x86/include/asm/qspinlock.h     | 11 ++++++++++-
 arch/x86/kernel/paravirt-spinlocks.c |  6 ++++++
 arch/x86/kernel/smpboot.c            |  2 ++
 arch/x86/xen/spinlock.c              |  2 ++
 kernel/locking/qspinlock.c           |  4 ++++
 5 files changed, 24 insertions(+), 1 deletion(-)
Sorry for the delay, picked it up now.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help