On Fri, Apr 8, 2022 at 1:08 PM Nick Desaulniers <ndesaulniers@xxxxxxxxxx> wrote: > > Lore thread start for newly cc'ed ML readers: > https://lore.kernel.org/lkml/7fad83ecde03540e65677959034315f8fbb3755e.1649434832.git.jpoimboe@xxxxxxxxxx/ > > On Fri, Apr 8, 2022 at 12:14 PM Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote: > > > > This weird option is having us upgrade quite a few 'inline' to > > '__always_inline'. > > As is, the assumption that __init functions only call other __init > functions or __always_inline is a brittle house of cards that leads to > a "what color is your function" [0] scenario, and leads to code that > happens to not emit warnings for compiler X (or compiler X version Y). > There's also curious exceptions in modpost that look like memory leaks > to me. These assumptions perhaps made more sense in a world prior to commit 889b3c1245de ("compiler: remove CONFIG_OPTIMIZE_INLINING entirely") https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=889b3c1245de48ed0cacf7aebb25c489d3e4a3e9 (I view 889b3c1245de favorably; perhaps this whole thread is just fallout from that change though. It's also interesting to note that CONFIG_OPTIMIZE_INLINING was enabled in the i386 and x86_64 defconfigs. That might color some folk's experience with the use of `inline` in the kernel sources and whether "inline means __attribute__((always_inline))"). -- Thanks, ~Nick Desaulniers