]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
[PATCH] lib/rwsem.c: un-inline rwsem_down_failed_common()
authorAndreas Mohr <andi@rhlx01.fht-esslingen.de>
Fri, 29 Sep 2006 09:01:20 +0000 (02:01 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Fri, 29 Sep 2006 16:18:22 +0000 (09:18 -0700)
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.

Signed-off-by: Andreas Mohr <andi@lisas.de>
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
lib/rwsem.c

index b322421c2969f1e3046313e91dcd3a07aa3fca9a..901d0e7da89220fae47848d349633ae43c1afd7e 100644 (file)
@@ -146,7 +146,7 @@ __rwsem_do_wake(struct rw_semaphore *sem, int downgrading)
 /*
  * 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)
 {