mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] Kconfig: -O3 enablement
@ 2022-06-21 13:35 Miko Larsson
  2022-06-21 13:35 ` [PATCH 1/2] Kconfig: Mark -O3 as experimental Miko Larsson
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Miko Larsson @ 2022-06-21 13:35 UTC (permalink / raw)
  To: linux-kernel
  Cc: Miko Larsson, linux-kbuild, x86, Nathan Chancellor,
	Vlastimil Babka, Nick Desaulniers, Thomas Gleixner,
	Sebastian Andrzej Siewior, Sean Christopherson,
	Gustavo A. R. Silva, Arnd Bergmann, Chris Down, Dmitry Torokhov,
	John Ogness, Elliot Berman, Oleksandr Natalenko

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.

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@redhat.com/

Cc: linux-kbuild@vger.kernel.org
Cc: x86@kernel.org
Cc: Nathan Chancellor <nathan@kernel.org>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Nick Desaulniers <ndesaulniers@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Sean Christopherson <seanjc@google.com>
Cc: "Gustavo A. R. Silva" <gustavoars@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Chris Down <chris@chrisdown.name>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: John Ogness <john.ogness@linutronix.de>
Cc: Elliot Berman <quic_eberman@quicinc.com>
Cc: Oleksandr Natalenko <oleksandr@redhat.com>

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


^ permalink raw reply	[flat|nested] 13+ messages in thread
* Re: [PATCH 0/2] Kconfig: -O3 enablement
@ 2022-06-24 18:29 Linus Torvalds
       [not found] ` <CA+55aFyugRmHNV1BbhB_YHf3mgaiU6ND_KL8bu0PPEaRVNwWHg@mail.gmail.com>
  0 siblings, 1 reply; 13+ messages in thread
From: Linus Torvalds @ 2022-06-24 18:29 UTC (permalink / raw)
  To: arnd
  Cc: bigeasy, chris, dmitry.torokhov, gustavoars, john.ogness,
	linux-kbuild, linux-kernel, masahiroy, mikoxyzzz, nathan,
	ndesaulniers, oleksandr, quic_eberman, seanjc, tglx, vbabka, x86

On Thu, Jun 23 at 7:27:29 PM  Arnd Bergmann <arnd@arndb.de> wrote:
>
> This probably also needs a dependency on !COMPILE_TEST so we don't
> report compile-time problems that are specific to -O3.

Honestly, let's just remove -O3 entirely.

Enabling it, and then not even build-testing the result, is just about
the *worst* possible case. That's just horrible.

The argument that "but ARC uses it" is not an argument. It was always
a bad argument, and ARC needs to just fix whatever it is that made it
an issue (likely already fixed with a compiler upgrade).

And there is no way I would ever accept this as a "let people try it" when

 - as mentioned, just use KCFLAGS=-O3 if you want to

 - -O3 has a *loong* history of generating worse code than -O2

so I will *not* be taking these kinds of patches without some very
serious explanations of why -O3 has suddenly become acceptable again.

Those explanations had better be more than "let people try". They
should have in-depth actual performance numbers for a real load, not
some made-up "bigger is better" logic.

                 Linus

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2022-06-24 18:38 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-21 13:35 [PATCH 0/2] Kconfig: -O3 enablement Miko Larsson
2022-06-21 13:35 ` [PATCH 1/2] Kconfig: Mark -O3 as experimental Miko Larsson
2022-06-21 13:35 ` [PATCH 2/2] Kconfig: Allow -O3 for all architectures Miko Larsson
2022-06-21 16:16 ` [PATCH 0/2] Kconfig: -O3 enablement Nick Desaulniers
2022-06-22  1:57   ` Masahiro Yamada
2022-06-23 15:42     ` Miko Larsson
2022-06-23 15:44       ` Masahiro Yamada
2022-06-23 17:00         ` Miko Larsson
2022-06-23 17:15           ` Masahiro Yamada
2022-06-23 17:44             ` Miko Larsson
2022-06-23 17:27     ` Arnd Bergmann
2022-06-24 18:29 Linus Torvalds
     [not found] ` <CA+55aFyugRmHNV1BbhB_YHf3mgaiU6ND_KL8bu0PPEaRVNwWHg@mail.gmail.com>
2022-06-24 18:38   ` Linus Torvalds

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®