public inbox for linux-arch@vger.kernel.org
 help / color / mirror / Atom feed
* [patch 0/4] Allow inlined spinlocks again V2
@ 2009-08-11 12:47 Heiko Carstens
  2009-08-11 12:47 ` [patch 1/4] spinlock: move spinlock function bodies to header file Heiko Carstens
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Heiko Carstens @ 2009-08-11 12:47 UTC (permalink / raw)
  To: Andrew Morton, Linus Torvalds, Peter Zijlstra, Ingo Molnar
  Cc: linux-arch, Martin Schwidefsky, Heiko Carstens

This patch set allows to have inlined spinlocks again.

V2: rewritten from scratch - now with readable code

The rationale behind this is that function calls on at least s390 are
expensive.

If one considers that server kernels are usually compiled with
!CONFIG_PREEMPT a simple spin_lock is just a compare and swap loop.
The extra overhead for a function call is significant.
With inlined spinlocks overall cpu usage gets reduced by 1%-5% on s390.
These numbers were taken with some network benchmarks. However I expect
any workload that calls frequently into the kernel and which grabs a few
locks to perform better.

The implementation is straight forward: move the function bodies of the
locking functions to static inline functions and place them in a header
file.
Dependent on CONFIG_SPINLOCK_INLINE generate out-of-line or inlined
locking functions.

The patches should be self explaining.

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

end of thread, other threads:[~2009-08-11 16:56 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-11 12:47 [patch 0/4] Allow inlined spinlocks again V2 Heiko Carstens
2009-08-11 12:47 ` [patch 1/4] spinlock: move spinlock function bodies to header file Heiko Carstens
2009-08-11 12:47 ` [patch 2/4] spinlock: add macro to generate out-of-line variants Heiko Carstens
2009-08-11 13:25   ` Arnd Bergmann
2009-08-11 13:35     ` Peter Zijlstra
2009-08-11 16:56     ` Heiko Carstens
2009-08-11 12:47 ` [patch 3/4] spinlock: allow inlined spinlocks Heiko Carstens
2009-08-11 12:48 ` [patch 4/4] spinlock: allow inline spinlocks on s390 Heiko Carstens
2009-08-11 13:00 ` [patch 0/4] Allow inlined spinlocks again V2 Peter Zijlstra

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