From: Andreas Mohr <andi@rhlx01.fht-esslingen.de>
To: Andrew Morton <akpm@osdl.org>
Cc: dhowells@redhat.com, linux-kernel@vger.kernel.org
Subject: [PATCH -mm] lib/rwsem.c: un-inline rwsem_down_failed_common()
Date: Mon, 28 Aug 2006 22:04:16 +0200 [thread overview]
Message-ID: <20060828200416.GA31315@rhlx01.fht-esslingen.de> (raw)
Un-inlining rwsem_down_failed_common() (two callsites) reduced
lib/rwsem.o on my Athlon, gcc 4.1.2 from 5935 to 5480 Bytes (455 Bytes saved).
I thus guess that reduced icache footprint (and better function caching)
is worth more than any function call overhead.
Compile-tested and run-tested on 2.6.18-rc4-mm3.
Signed-off-by: Andreas Mohr <andi@lisas.de>
--- linux-2.6.18-rc4-mm3.orig/lib/rwsem.c 2006-08-22 21:09:55.000000000 +0200
+++ linux-2.6.18-rc4-mm3/lib/rwsem.c 2006-09-05 21:52:09.000000000 +0200
@@ -146,7 +146,7 @@
/*
* wait for a lock to be granted
*/
-static inline struct rw_semaphore *
+static struct rw_semaphore *
rwsem_down_failed_common(struct rw_semaphore *sem,
struct rwsem_waiter *waiter, signed long adjustment)
{
next reply other threads:[~2006-08-28 20:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-28 20:04 Andreas Mohr [this message]
2006-08-29 9:50 ` David Howells
2006-08-29 9:59 ` Arjan van de Ven
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=20060828200416.GA31315@rhlx01.fht-esslingen.de \
--to=andi@rhlx01.fht-esslingen.de \
--cc=akpm@osdl.org \
--cc=dhowells@redhat.com \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®