提交 fdf8cb09 编写于 作者: A Andreas Mohr 提交者: Linus Torvalds

[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: NAndreas Mohr <andi@lisas.de>
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 2752e401
...@@ -146,7 +146,7 @@ __rwsem_do_wake(struct rw_semaphore *sem, int downgrading) ...@@ -146,7 +146,7 @@ __rwsem_do_wake(struct rw_semaphore *sem, int downgrading)
/* /*
* wait for a lock to be granted * wait for a lock to be granted
*/ */
static inline struct rw_semaphore * static struct rw_semaphore *
rwsem_down_failed_common(struct rw_semaphore *sem, rwsem_down_failed_common(struct rw_semaphore *sem,
struct rwsem_waiter *waiter, signed long adjustment) struct rwsem_waiter *waiter, signed long adjustment)
{ {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册