mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/2] guard virt_spin_lock() with a static key
@ 2017-09-06 15:29 Juergen Gross
  2017-09-06 15:29 ` [PATCH v2 1/2] paravirt/locks: use new static key for controlling call of virt_spin_lock() Juergen Gross
  2017-09-06 15:29 ` [PATCH v2 2/2] paravirt,xen: correct xen_nopvspin case Juergen Gross
  0 siblings, 2 replies; 8+ messages in thread
From: Juergen Gross @ 2017-09-06 15:29 UTC (permalink / raw)
  To: linux-kernel, xen-devel, x86, virtualization
  Cc: jeremy, chrisw, akataria, rusty, boris.ostrovsky, hpa, tglx,
	mingo, peterz, longman, Juergen Gross

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.

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, 25 insertions(+)

-- 
2.12.3

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-09-06 17:53 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-06 15:29 [PATCH v2 0/2] guard virt_spin_lock() with a static key Juergen Gross
2017-09-06 15:29 ` [PATCH v2 1/2] paravirt/locks: use new static key for controlling call of virt_spin_lock() Juergen Gross
2017-09-06 15:49   ` Waiman Long
2017-09-06 16:04     ` Peter Zijlstra
2017-09-06 16:13       ` Waiman Long
2017-09-06 17:33         ` Juergen Gross
2017-09-06 15:29 ` [PATCH v2 2/2] paravirt,xen: correct xen_nopvspin case Juergen Gross
2017-09-06 15:50   ` Waiman Long

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®