diff options
author | Peter Zijlstra <peterz@infradead.org> | 2016-12-23 10:36:00 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2017-01-14 11:14:48 +0100 |
commit | 427b18207a87f6306bd53a74e03dbe17392b0045 (patch) | |
tree | f2e01fa5f318d2bbdebf98fe7c0f472da835160c /kernel/Kconfig.preempt | |
parent | 659cf9f5824a12e6b50785e4e9cf1adf8a3adbd0 (diff) | |
download | linux-427b18207a87f6306bd53a74e03dbe17392b0045.tar.bz2 |
locking/mutex: Improve inlining
Instead of inlining __mutex_lock_common() 5 times, once for each
{state,ww} variant. Reduce this to two, ww and !ww.
Then add __always_inline to mutex_optimistic_spin(), so that that will
get inlined all 4 remaining times, for all {waiter,ww} variants.
text data bss dec hex filename
6301 0 0 6301 189d defconfig-build/kernel/locking/mutex.o
4053 0 0 4053 fd5 defconfig-build/kernel/locking/mutex.o
4257 0 0 4257 10a1 defconfig-build/kernel/locking/mutex.o
This reduces total text size and better separates the ww and !ww mutex
code generation.
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/Kconfig.preempt')
0 files changed, 0 insertions, 0 deletions