Re: [PATCH v3 4/9] x86: alternatives: macrofy locks for better inlining

2018-06-11 Thread Peter Zijlstra
On Sun, Jun 10, 2018 at 07:19:06AM -0700, Nadav Amit wrote: > #ifdef CONFIG_SMP > +.macro LOCK_PREFIX_HERE > .pushsection .smp_locks,"a" > .balign 4 > + .long 671f - . # offset > .popsection > +671: > +.endm > + > +.macro LOCK_PREFIX insn:vararg > + LOCK_PREFIX_H

[PATCH v3 4/9] x86: alternatives: macrofy locks for better inlining

2018-06-10 Thread Nadav Amit
GCC considers the number of statements in inlined assembly blocks, according to new-lines and semicolons, as an indication to the cost of the block in time and space. This data is distorted by the kernel code, which puts information in alternative sections. As a result, the compiler may perform inc