All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] generic/bitops: Always inline some more generic helpers
@ 2022-01-13 15:53 Borislav Petkov
  2022-01-13 15:53 ` [PATCH 1/2] asm-generic/bitops: Always inline all bit manipulation helpers Borislav Petkov
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Borislav Petkov @ 2022-01-13 15:53 UTC (permalink / raw)
  To: Peter Zijlstra
  Cc: Arnd Bergmann, Boqun Feng, Marco Elver, Paul E. McKenney,
	Will Deacon, X86 ML, LKML

From: Borislav Petkov <bp@suse.de>

Hi all,

a build report by the 0day robot:

  https://lore.kernel.org/r/Yc7t934f%2Bf/mO8lj@zn.tnic

made me look at asm and how gcc, at least, generates funky calls to the
*_bit() bit manipulation functions on x86 instead of inlining them into
the call sites as on x86 that's a single insn, in most of the cases.

So PeterZ says the way to go is to always inline them. So here they are.
The fun thing is that on x86 there is even a size decrease of more than
a Kilobyte for a defconfig, which is nice, see patch 1.

As always, comments and suggestions are welcome.

Thx.

Borislav Petkov (2):
  asm-generic/bitops: Always inline all bit manipulation helpers
  cpumask: Always inline helpers which use bit manipulation functions

 include/asm-generic/bitops/instrumented-atomic.h | 12 ++++++------
 .../asm-generic/bitops/instrumented-non-atomic.h | 16 ++++++++--------
 include/linux/cpumask.h                          | 14 +++++++-------
 3 files changed, 21 insertions(+), 21 deletions(-)

-- 
2.29.2


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-01-26 13:30 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-13 15:53 [PATCH 0/2] generic/bitops: Always inline some more generic helpers Borislav Petkov
2022-01-13 15:53 ` [PATCH 1/2] asm-generic/bitops: Always inline all bit manipulation helpers Borislav Petkov
2022-01-26 13:30   ` [tip: locking/core] " tip-bot2 for Borislav Petkov
2022-01-13 15:53 ` [PATCH 2/2] cpumask: Always inline helpers which use bit manipulation functions Borislav Petkov
2022-01-26 13:30   ` [tip: locking/core] " tip-bot2 for Borislav Petkov
2022-01-13 16:58 ` [PATCH 0/2] generic/bitops: Always inline some more generic helpers Marco Elver
2022-01-14  8:12   ` Peter Zijlstra

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.