Re: [PATCH 0/2] Kconfig: -O3 enablement

From: Masahiro Yamada
Date: Tue Jun 21 2022 - 21:58:46 EST


On Wed, Jun 22, 2022 at 1:17 AM Nick Desaulniers
<ndesaulniers@xxxxxxxxxx> wrote:
>
> On Tue, Jun 21, 2022 at 6:35 AM Miko Larsson <mikoxyzzz@xxxxxxxxx> wrote:
> >
> > Hi,
> >
> > This very small series allows -O3 to be used for all architectures. The
> > first patch marks -O3 as experimental, with the reasoning being that it
> > might expose unwanted regressions to users, and the second patch
> > actually allows -O3 by removing the "depend on ARC" string.
>
> I think we should just remove -O3 support from KCONFIG.
>
> If someone wants to mess around with "experimental features," there's
> nothing stopping you from doing:
>
> $ make KCFLAGS=-O3
>

ARC uses -O3 since day1.

"Generic build system uses -O2, we want -O3"
in commit cfdbc2e16e65c1ec1c23057640607cee98d1a1bd

If they want -O3, it is up to the ARC maintainer.



If you want to say "use this option carefully",
EXPERT might be another option.

depends on ARC || EXPERT







> >
> > The reasoning behind this series is to open up -O3 so that bugs related
> > to it (both compiler-related and kernel-related) can be discovered by
> > eyeballs wanting to improve the "-O3 experience," as that might be
> > beneficial to both compilers and the kernel. This has been attempted
> > before [1], but unfortunately nothing ever came of it.
> >
> > [1] https://lore.kernel.org/lkml/20191211104619.114557-1-oleksandr@xxxxxxxxxx/
> >
> > Cc: linux-kbuild@xxxxxxxxxxxxxxx
> > Cc: x86@xxxxxxxxxx
> > Cc: Nathan Chancellor <nathan@xxxxxxxxxx>
> > Cc: Vlastimil Babka <vbabka@xxxxxxx>
> > Cc: Nick Desaulniers <ndesaulniers@xxxxxxxxxx>
> > Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
> > Cc: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx>
> > Cc: Sean Christopherson <seanjc@xxxxxxxxxx>
> > Cc: "Gustavo A. R. Silva" <gustavoars@xxxxxxxxxx>
> > Cc: Arnd Bergmann <arnd@xxxxxxxx>
> > Cc: Chris Down <chris@xxxxxxxxxxxxxx>
> > Cc: Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx>
> > Cc: John Ogness <john.ogness@xxxxxxxxxxxxx>
> > Cc: Elliot Berman <quic_eberman@xxxxxxxxxxx>
> > Cc: Oleksandr Natalenko <oleksandr@xxxxxxxxxx>
> >
> > Miko Larsson (2):
> > Kconfig: Mark -O3 as experimental
> > Kconfig: Allow -O3 for all architectures
> >
> > init/Kconfig | 6 ++++--
> > 1 file changed, 4 insertions(+), 2 deletions(-)
> >
> > --
> > 2.36.1
> >
>
>
> --
> Thanks,
> ~Nick Desaulniers



--
Best Regards
Masahiro Yamada