[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAFULd4ZBvv+HeHwH_0br+_jdJ4sgpjdNGtqAxL4=c629kBaQbw@mail.gmail.com>
Date: Thu, 20 Mar 2025 12:58:22 +0100
From: Uros Bizjak <ubizjak@...il.com>
To: Ingo Molnar <mingo@...nel.org>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>, "H. Peter Anvin" <hpa@...or.com>,
linux-kernel@...r.kernel.org, Juergen Gross <jgross@...e.com>,
Stefano Stabellini <sstabellini@...nel.org>, "Ahmed S . Darwish" <darwi@...utronix.de>,
Andrew Cooper <andrew.cooper3@...rix.com>, John Ogness <john.ogness@...utronix.de>,
Peter Zijlstra <peterz@...radead.org>, Borislav Petkov <bp@...en8.de>,
Thomas Gleixner <tglx@...utronix.de>, Josh Poimboeuf <jpoimboe@...hat.com>
Subject: Re: [PATCH] compiler/gcc: Make asm() templates asm __inline__() by default
On Thu, Mar 20, 2025 at 11:30 AM Uros Bizjak <ubizjak@...il.com> wrote:
> > > 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@mail.gmail.com/
> >
> > 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.
So, trying your patch on vanilla mainline kernel with gcc-14.2.1
resulted in (approx) the list you reported. However, adding my patch
that converted locking instructions [1] over your patch resulted in
(expected) hundreds (~1700) of changed functions.
[1] https://lore.kernel.org/lkml/20250309170955.48919-1-ubizjak@gmail.com/
The takeout from the experiment is that your proposed change is not
enough to convert "everything" and misses many cases (at least locking
instructions, as confirmed by my experiment). We should use a more
precise instrument and use it case-by-case. This will be some more
work, but on the first look, there are relatively few interesting
cases remaining.
Uros.
Powered by blists - more mailing lists