Re: [PATCH -tip] x86/locking/atomic: Use asm_inline for atomic locking insns

David Laight
2025-03-05T22:18:10Z

On Wed, 5 Mar 2025 20:47:46 +0100
Uros Bizjak <ubizjak@gmail.com> wrote:

...
> From the compiler POV, now that "lock; " prefix lost its semicolon,
> removing LOCK_PREFIX_HERE or using asm_inline would result in exactly
> the same code. The problematic 31k code size increase (1.1%) with -O2
> is inevitable either way, if we want to move forward.

Have you looked to see where that 31k comes from?
The compiler must be very near to inlining something and removing a couple
of instructions is making a big difference.
It is quite likely that some other change will have the same (or the reverse)
effect.

David