xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/6] x86: reduce paravirtualized spinlock overhead
@ 2015-04-30 10:53 Juergen Gross
  2015-04-30 10:53 ` [PATCH 1/6] x86: use macro instead of "0" for setting TICKET_SLOWPATH_FLAG Juergen Gross
                   ` (9 more replies)
  0 siblings, 10 replies; 17+ messages in thread
From: Juergen Gross @ 2015-04-30 10:53 UTC (permalink / raw)
  To: linux-kernel, x86, hpa, tglx, mingo, xen-devel, konrad.wilk,
	david.vrabel, boris.ostrovsky, jeremy, chrisw, akataria, rusty,
	virtualization, gleb, pbonzini, kvm
  Cc: Juergen Gross

Paravirtualized spinlocks produce some overhead even if the kernel is
running on bare metal. The main reason are the more complex locking
and unlocking functions. Especially unlocking is no longer just one
instruction but so complex that it is no longer inlined.

This patch series addresses this issue by adding two more pvops
functions to reduce the size of the inlined spinlock functions. When
running on bare metal unlocking is again basically one instruction.

Compile tested with CONFIG_PARAVIRT_SPINLOCKS on and off, 32 and 64
bits.

Functional testing on bare metal and as Xen dom0.

Correct patching verified by disassembly of active kernel.

Juergen Gross (6):
  x86: use macro instead of "0" for setting TICKET_SLOWPATH_FLAG
  x86: move decision about clearing slowpath flag into arch_spin_lock()
  x86: introduce new pvops function clear_slowpath
  x86: introduce new pvops function spin_unlock
  x86: switch config from UNINLINE_SPIN_UNLOCK to INLINE_SPIN_UNLOCK
  x86: remove no longer needed paravirt_ticketlocks_enabled

 arch/x86/Kconfig                      |  1 -
 arch/x86/include/asm/paravirt.h       | 13 +++++++++
 arch/x86/include/asm/paravirt_types.h | 12 ++++++++
 arch/x86/include/asm/spinlock.h       | 53 ++++++++++++-----------------------
 arch/x86/include/asm/spinlock_types.h |  3 +-
 arch/x86/kernel/kvm.c                 | 14 +--------
 arch/x86/kernel/paravirt-spinlocks.c  | 42 +++++++++++++++++++++++++--
 arch/x86/kernel/paravirt.c            | 12 ++++++++
 arch/x86/kernel/paravirt_patch_32.c   | 25 +++++++++++++++++
 arch/x86/kernel/paravirt_patch_64.c   | 24 ++++++++++++++++
 arch/x86/xen/spinlock.c               | 23 +--------------
 include/linux/spinlock_api_smp.h      |  2 +-
 kernel/Kconfig.locks                  |  7 +++--
 kernel/Kconfig.preempt                |  3 +-
 kernel/locking/spinlock.c             |  2 +-
 lib/Kconfig.debug                     |  1 -
 16 files changed, 154 insertions(+), 83 deletions(-)

-- 
2.1.4


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

end of thread, other threads:[~2015-06-16 15:18 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-30 10:53 [PATCH 0/6] x86: reduce paravirtualized spinlock overhead Juergen Gross
2015-04-30 10:53 ` [PATCH 1/6] x86: use macro instead of "0" for setting TICKET_SLOWPATH_FLAG Juergen Gross
2015-04-30 10:53 ` [PATCH 2/6] x86: move decision about clearing slowpath flag into arch_spin_lock() Juergen Gross
2015-04-30 10:54 ` [PATCH 3/6] x86: introduce new pvops function clear_slowpath Juergen Gross
2015-04-30 10:54 ` [PATCH 4/6] x86: introduce new pvops function spin_unlock Juergen Gross
2015-04-30 10:54 ` [PATCH 5/6] x86: switch config from UNINLINE_SPIN_UNLOCK to INLINE_SPIN_UNLOCK Juergen Gross
2015-04-30 10:54 ` [PATCH 6/6] x86: remove no longer needed paravirt_ticketlocks_enabled Juergen Gross
2015-04-30 16:39 ` [PATCH 0/6] x86: reduce paravirtualized spinlock overhead Jeremy Fitzhardinge
2015-05-04  5:55   ` Juergen Gross
2015-05-05 17:21     ` Jeremy Fitzhardinge
2015-05-06 11:55       ` Juergen Gross
2015-05-17  5:30         ` Ingo Molnar
2015-05-18  8:11           ` Juergen Gross
2015-05-15 12:16 ` Juergen Gross
2015-06-08  4:09 ` Juergen Gross
2015-06-16 14:37 ` Juergen Gross
2015-06-16 15:18   ` Thomas Gleixner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).