From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Ingo Molnar <mingo@elte.hu>,
linux-arch@vger.kernel.org,
Martin Schwidefsky <schwidefsky@de.ibm.com>,
David Miller <davem@davemloft.net>
Subject: Re: [patch 0/4] Allow inlined spinlocks again V2
Date: Tue, 11 Aug 2009 15:00:49 +0200 [thread overview]
Message-ID: <1249995649.10001.6.camel@twins> (raw)
In-Reply-To: <20090811124756.873490673@de.ibm.com>
On Tue, 2009-08-11 at 14:47 +0200, Heiko Carstens wrote:
> 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.
These look lots better than the previous series ;-)
Given that you've got a significant performance gain from this and it
doesn't look too horrible anymore,
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
IIRC sparc64 also has a funny calling convention, so it might be of
interest to DaveM as well.
prev parent reply other threads:[~2009-08-11 13:01 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Peter Zijlstra [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1249995649.10001.6.camel@twins \
--to=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=davem@davemloft.net \
--cc=heiko.carstens@de.ibm.com \
--cc=linux-arch@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=schwidefsky@de.ibm.com \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox