WSL2-Linux-Kernel/include/asm-generic/bitops
Andi Kleen c8399943bd x86, generic: mark complex bitops.h inlines as __always_inline
Impact: reduce kernel image size

Hugh Dickins noticed that older gcc versions when the kernel
is built for code size didn't inline some of the bitops.

Mark all complex x86 bitops that have more than a single
asm statement or two as always inline to avoid this problem.

Probably should be done for other architectures too.

Ingo then found a better fix that only requires
a single line change, but it unfortunately only
works on gcc 4.3.

On older gccs the original patch still makes a ~0.3% defconfig
difference with CONFIG_OPTIMIZE_INLINING=y.

With gcc 4.1 and a defconfig like build:

    6116998 1138540  883788 8139326  7c323e vmlinux-oi-with-patch
    6137043 1138540  883788 8159371  7c808b vmlinux-optimize-inlining

~20k / 0.3% difference.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-01-13 18:56:30 +01:00
..
__ffs.h x86, generic: mark complex bitops.h inlines as __always_inline 2009-01-13 18:56:30 +01:00
__fls.h x86, generic: mark complex bitops.h inlines as __always_inline 2009-01-13 18:56:30 +01:00
atomic.h define first set of BIT* macros 2007-10-19 11:53:42 -07:00
ext2-atomic.h [PATCH] bitops: generic ext2_{set,clear}_bit_atomic() 2006-03-26 08:57:11 -08:00
ext2-non-atomic.h ext4: Add ext4_find_next_bit() 2008-01-28 23:58:27 -05:00
ffs.h [PATCH] bitops: generic ffs() 2006-03-26 08:57:11 -08:00
ffz.h [PATCH] bitops: generic ffz() 2006-03-26 08:57:10 -08:00
find.h x86, generic: optimize find_next_(zero_)bit for small constant-size bitmaps 2008-04-26 19:21:16 +02:00
fls.h x86, generic: mark complex bitops.h inlines as __always_inline 2009-01-13 18:56:30 +01:00
fls64.h x86, generic: mark complex bitops.h inlines as __always_inline 2009-01-13 18:56:30 +01:00
hweight.h [PATCH] fix error: __u32 undeclared 2006-03-26 08:57:11 -08:00
le.h ext4: Add ext4_find_next_bit() 2008-01-28 23:58:27 -05:00
lock.h bitops: introduce lock ops 2007-10-18 14:37:29 -07:00
minix-le.h [PATCH] bitops: generic minix_{test,set,test_and_clear,test,find_first_zero}_bit() 2006-03-26 08:57:11 -08:00
minix.h [PATCH] bitops: generic minix_{test,set,test_and_clear,test,find_first_zero}_bit() 2006-03-26 08:57:11 -08:00
non-atomic.h define first set of BIT* macros 2007-10-19 11:53:42 -07:00
sched.h sched: simplify sched_find_first_bit() 2007-07-09 18:52:00 +02:00