Re: [PATCH] compiler/gcc: Make asm() templates asm __inline__() by default
From: Uros Bizjak
Date: Thu Mar 20 2025 - 06:31:04 EST
On Thu, Mar 20, 2025 at 9:59 AM Ingo Molnar <mingo@xxxxxxxxxx> wrote:
>
>
> * Uros Bizjak <ubizjak@xxxxxxxxx> wrote:
>
> > > > > I haven't looked at code generation much yet, but text size changes are
> > > > > minimal:
> > > > >
> > > > > text data bss dec hex filename
> > > > > 29429076 7931870 1401196 38762142 24f769e vmlinux.before
> > > > > 29429631 7931870 1401200 38762701 24f78cd vmlinux.after
> > > > >
> > > > > Which is promising, assuming I haven't messed up anywhere.
> > > >
> > > > Please use bloat-o-meter, it is more precise.
> > >
> > > Here's the bloat-o-meter output between vanilla and patched vmlinux:
> >
> > [...]
> >
> > > A lot fewer functions are affected than I expected from such a
> > > large-scope change.
> >
> > Interestingly, I got *many* more changes just from converting atomic
> > locking functions to asm_inline, as reported in [1].
> >
> > [1] https://lore.kernel.org/lkml/CAFULd4YBcG45bigHBox2pu+To+Y5BzbRxG+pUr42AVOWSnfKsg@xxxxxxxxxxxxxx/
>
> Have you used a pristine x86-64 defconfig for your build tests?
Yes, it was vanilla x86-64 defconfig, but in -tip tree.
> Could you perhaps check my patch against your patch in your build
> environment and figure out why there's such unexpected differences?
>
> As you noted my patch should be a blunt-instrument superset of your
> changes so if then it should affect *more* functions, not fewer.
Yes, I'll try this experiment.
Thanks,
Uros.