From: Andreas Mohr Date: Fri, 29 Sep 2006 09:01:20 +0000 (-0700) Subject: [PATCH] lib/rwsem.c: un-inline rwsem_down_failed_common() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=fdf8cb0909b531f9ae8f9b9d7e4eb35ba3505f07;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git [PATCH] lib/rwsem.c: un-inline rwsem_down_failed_common() 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 Cc: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/lib/rwsem.c b/lib/rwsem.c index b322421c296..901d0e7da89 100644 --- a/lib/rwsem.c +++ b/lib/rwsem.c @@ -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) {