* Re: [PATCH 0/2] Kconfig: -O3 enablement
@ 2022-06-24 18:29 Linus Torvalds
[not found] ` <CA+55aFyugRmHNV1BbhB_YHf3mgaiU6ND_KL8bu0PPEaRVNwWHg@mail.gmail.com>
2022-06-28 21:04 ` [PATCH] kbuild: drop support for CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3 Nick Desaulniers
0 siblings, 2 replies; 6+ 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] 6+ messages in thread[parent not found: <CA+55aFyugRmHNV1BbhB_YHf3mgaiU6ND_KL8bu0PPEaRVNwWHg@mail.gmail.com>]
* Re: [PATCH 0/2] Kconfig: -O3 enablement [not found] ` <CA+55aFyugRmHNV1BbhB_YHf3mgaiU6ND_KL8bu0PPEaRVNwWHg@mail.gmail.com> @ 2022-06-24 18:38 ` Linus Torvalds 0 siblings, 0 replies; 6+ messages in thread From: Linus Torvalds @ 2022-06-24 18:38 UTC (permalink / raw) To: Arnd Bergmann Cc: Sebastian Andrzej Siewior, Chris Down, Dmitry Torokhov, Gustavo A. R. Silva, John Ogness, Linux Kbuild mailing list, Linux Kernel Mailing List, Masahiro Yamada, mikoxyzzz, Nathan Chancellor, Nick Desaulniers, Oleksandr Natalenko, quic_eberman, Sean Christopherson, Thomas Gleixner, Vlastimil Babka, the arch/x86 maintainers > On Fri, Jun 24, 2022 at 11:29 AM Linus Torvalds <linus@linux-foundation.org> wrote: Bah. That was really me, just with a badly set up "reply through lore" setup, so with the wrong email address. That's what happens when you are (a) incompetent (b) stopped getting the mailing lists as regular email because you think lore works so well (c) normally rely on being cc'd My apologies for the incompetence. Linus ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] kbuild: drop support for CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3 2022-06-24 18:29 [PATCH 0/2] Kconfig: -O3 enablement Linus Torvalds [not found] ` <CA+55aFyugRmHNV1BbhB_YHf3mgaiU6ND_KL8bu0PPEaRVNwWHg@mail.gmail.com> @ 2022-06-28 21:04 ` Nick Desaulniers 2022-06-29 10:48 ` Miko Larsson 2022-07-11 5:05 ` Masahiro Yamada 1 sibling, 2 replies; 6+ messages in thread From: Nick Desaulniers @ 2022-06-28 21:04 UTC (permalink / raw) To: Masahiro Yamada, Linus Torvalds Cc: arnd, bigeasy, chris, dmitry.torokhov, gustavoars, john.ogness, linux-kbuild, linux-kernel, mikoxyzzz, nathan, ndesaulniers, oleksandr, quic_eberman, seanjc, tglx, vbabka, x86, linux-snps-arc, Vineet Gupta The difference in most compilers between `-O3` and `-O2` is mostly down to whether loops with statically determinable trip counts are fully unrolled vs unrolled to a multiple of SIMD width. This patch is effectively a revert of commit 15f5db60a137 ("kbuild,arc: add CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3 for ARC") without re-adding ARCH_CFLAGS Ever since commit cfdbc2e16e65 ("ARC: Build system: Makefiles, Kconfig, Linker script") ARC has been built with -O3, though the reason for doing so was not specified in inline comments or the commit message. This commit does not re-add -O3 to arch/arc/Makefile. Folks looking to experiment with `-O3` (or any compiler flag for that matter) may pass them along to the command line invocation of make: $ make KCFLAGS=-O3 Code that looks to re-add an explicit Kconfig option for `-O3` should provide: 1. A rigorous and reproducible performance profile of a reasonable userspace workload that demonstrates a hot loop in the kernel that would benefit from `-O3` over `-O2`. 2. Disassembly of said loop body before and after. 3. Provides stats on terms of increase in file size. Link: https://lore.kernel.org/linux-kbuild/CA+55aFz2sNBbZyg-_i8_Ldr2e8o9dfvdSfHHuRzVtP2VMAUWPg@mail.gmail.com/ Signed-off-by: Nick Desaulniers <ndesaulniers@google.com> --- Makefile | 2 -- arch/arc/configs/axs101_defconfig | 1 - arch/arc/configs/axs103_defconfig | 1 - arch/arc/configs/axs103_smp_defconfig | 1 - arch/arc/configs/haps_hs_defconfig | 1 - arch/arc/configs/haps_hs_smp_defconfig | 1 - arch/arc/configs/hsdk_defconfig | 1 - arch/arc/configs/nsim_700_defconfig | 1 - arch/arc/configs/nsimosci_defconfig | 1 - arch/arc/configs/nsimosci_hs_defconfig | 1 - arch/arc/configs/nsimosci_hs_smp_defconfig | 1 - arch/arc/configs/tb10x_defconfig | 1 - arch/arc/configs/vdk_hs38_defconfig | 1 - arch/arc/configs/vdk_hs38_smp_defconfig | 1 - init/Kconfig | 7 ------- 15 files changed, 22 deletions(-) diff --git a/Makefile b/Makefile index 8973b285ce6c..b69f6cd7f2e2 100644 --- a/Makefile +++ b/Makefile @@ -755,8 +755,6 @@ KBUILD_CFLAGS += $(call cc-disable-warning, address-of-packed-member) ifdef CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE KBUILD_CFLAGS += -O2 -else ifdef CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3 -KBUILD_CFLAGS += -O3 else ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE KBUILD_CFLAGS += -Os endif diff --git a/arch/arc/configs/axs101_defconfig b/arch/arc/configs/axs101_defconfig index 0016149f9583..e31a8ebc3ecc 100644 --- a/arch/arc/configs/axs101_defconfig +++ b/arch/arc/configs/axs101_defconfig @@ -9,7 +9,6 @@ CONFIG_NAMESPACES=y # CONFIG_UTS_NS is not set # CONFIG_PID_NS is not set CONFIG_BLK_DEV_INITRD=y -CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3=y CONFIG_EMBEDDED=y CONFIG_PERF_EVENTS=y # CONFIG_VM_EVENT_COUNTERS is not set diff --git a/arch/arc/configs/axs103_defconfig b/arch/arc/configs/axs103_defconfig index 5b031582a1cf..e0e8567f0d75 100644 --- a/arch/arc/configs/axs103_defconfig +++ b/arch/arc/configs/axs103_defconfig @@ -9,7 +9,6 @@ CONFIG_NAMESPACES=y # CONFIG_UTS_NS is not set # CONFIG_PID_NS is not set CONFIG_BLK_DEV_INITRD=y -CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3=y CONFIG_EMBEDDED=y CONFIG_PERF_EVENTS=y # CONFIG_VM_EVENT_COUNTERS is not set diff --git a/arch/arc/configs/axs103_smp_defconfig b/arch/arc/configs/axs103_smp_defconfig index d4eec39e0112..fcbc952bc75b 100644 --- a/arch/arc/configs/axs103_smp_defconfig +++ b/arch/arc/configs/axs103_smp_defconfig @@ -9,7 +9,6 @@ CONFIG_NAMESPACES=y # CONFIG_UTS_NS is not set # CONFIG_PID_NS is not set CONFIG_BLK_DEV_INITRD=y -CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3=y CONFIG_EMBEDDED=y CONFIG_PERF_EVENTS=y # CONFIG_VM_EVENT_COUNTERS is not set diff --git a/arch/arc/configs/haps_hs_defconfig b/arch/arc/configs/haps_hs_defconfig index 7337cdf4ffdd..d87ad7e88d62 100644 --- a/arch/arc/configs/haps_hs_defconfig +++ b/arch/arc/configs/haps_hs_defconfig @@ -11,7 +11,6 @@ CONFIG_NAMESPACES=y # CONFIG_UTS_NS is not set # CONFIG_PID_NS is not set CONFIG_BLK_DEV_INITRD=y -CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3=y CONFIG_EXPERT=y CONFIG_PERF_EVENTS=y # CONFIG_COMPAT_BRK is not set diff --git a/arch/arc/configs/haps_hs_smp_defconfig b/arch/arc/configs/haps_hs_smp_defconfig index bc927221afc0..8d82cdb7f86a 100644 --- a/arch/arc/configs/haps_hs_smp_defconfig +++ b/arch/arc/configs/haps_hs_smp_defconfig @@ -11,7 +11,6 @@ CONFIG_NAMESPACES=y # CONFIG_UTS_NS is not set # CONFIG_PID_NS is not set CONFIG_BLK_DEV_INITRD=y -CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3=y CONFIG_EMBEDDED=y CONFIG_PERF_EVENTS=y # CONFIG_VM_EVENT_COUNTERS is not set diff --git a/arch/arc/configs/hsdk_defconfig b/arch/arc/configs/hsdk_defconfig index aa000075a575..f856b03e0fb5 100644 --- a/arch/arc/configs/hsdk_defconfig +++ b/arch/arc/configs/hsdk_defconfig @@ -9,7 +9,6 @@ CONFIG_NAMESPACES=y # CONFIG_PID_NS is not set CONFIG_BLK_DEV_INITRD=y CONFIG_BLK_DEV_RAM=y -CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3=y CONFIG_EMBEDDED=y CONFIG_PERF_EVENTS=y # CONFIG_VM_EVENT_COUNTERS is not set diff --git a/arch/arc/configs/nsim_700_defconfig b/arch/arc/configs/nsim_700_defconfig index 326f6cde7826..a1ce12bf5b16 100644 --- a/arch/arc/configs/nsim_700_defconfig +++ b/arch/arc/configs/nsim_700_defconfig @@ -11,7 +11,6 @@ CONFIG_NAMESPACES=y # CONFIG_UTS_NS is not set # CONFIG_PID_NS is not set CONFIG_BLK_DEV_INITRD=y -CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3=y CONFIG_KALLSYMS_ALL=y CONFIG_EMBEDDED=y CONFIG_PERF_EVENTS=y diff --git a/arch/arc/configs/nsimosci_defconfig b/arch/arc/configs/nsimosci_defconfig index bf39a0091679..ca10f4a2c823 100644 --- a/arch/arc/configs/nsimosci_defconfig +++ b/arch/arc/configs/nsimosci_defconfig @@ -10,7 +10,6 @@ CONFIG_NAMESPACES=y # CONFIG_UTS_NS is not set # CONFIG_PID_NS is not set CONFIG_BLK_DEV_INITRD=y -CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3=y CONFIG_KALLSYMS_ALL=y CONFIG_EMBEDDED=y CONFIG_PERF_EVENTS=y diff --git a/arch/arc/configs/nsimosci_hs_defconfig b/arch/arc/configs/nsimosci_hs_defconfig index 7121bd71c543..31b6ec3683c6 100644 --- a/arch/arc/configs/nsimosci_hs_defconfig +++ b/arch/arc/configs/nsimosci_hs_defconfig @@ -10,7 +10,6 @@ CONFIG_NAMESPACES=y # CONFIG_UTS_NS is not set # CONFIG_PID_NS is not set CONFIG_BLK_DEV_INITRD=y -CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3=y CONFIG_KALLSYMS_ALL=y CONFIG_EMBEDDED=y CONFIG_PERF_EVENTS=y diff --git a/arch/arc/configs/nsimosci_hs_smp_defconfig b/arch/arc/configs/nsimosci_hs_smp_defconfig index f9863b294a70..41a0037f48a5 100644 --- a/arch/arc/configs/nsimosci_hs_smp_defconfig +++ b/arch/arc/configs/nsimosci_hs_smp_defconfig @@ -8,7 +8,6 @@ CONFIG_IKCONFIG_PROC=y # CONFIG_UTS_NS is not set # CONFIG_PID_NS is not set CONFIG_BLK_DEV_INITRD=y -CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3=y CONFIG_PERF_EVENTS=y # CONFIG_COMPAT_BRK is not set CONFIG_KPROBES=y diff --git a/arch/arc/configs/tb10x_defconfig b/arch/arc/configs/tb10x_defconfig index a12656ec0072..d93b65008d4a 100644 --- a/arch/arc/configs/tb10x_defconfig +++ b/arch/arc/configs/tb10x_defconfig @@ -14,7 +14,6 @@ CONFIG_INITRAMFS_SOURCE="../tb10x-rootfs.cpio" CONFIG_INITRAMFS_ROOT_UID=2100 CONFIG_INITRAMFS_ROOT_GID=501 # CONFIG_RD_GZIP is not set -CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3=y CONFIG_KALLSYMS_ALL=y # CONFIG_AIO is not set CONFIG_EMBEDDED=y diff --git a/arch/arc/configs/vdk_hs38_defconfig b/arch/arc/configs/vdk_hs38_defconfig index d7c858df520c..0c3b21416819 100644 --- a/arch/arc/configs/vdk_hs38_defconfig +++ b/arch/arc/configs/vdk_hs38_defconfig @@ -4,7 +4,6 @@ CONFIG_HIGH_RES_TIMERS=y CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y CONFIG_BLK_DEV_INITRD=y -CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3=y CONFIG_EMBEDDED=y CONFIG_PERF_EVENTS=y # CONFIG_VM_EVENT_COUNTERS is not set diff --git a/arch/arc/configs/vdk_hs38_smp_defconfig b/arch/arc/configs/vdk_hs38_smp_defconfig index 015c1d43889e..f9ad9d3ee702 100644 --- a/arch/arc/configs/vdk_hs38_smp_defconfig +++ b/arch/arc/configs/vdk_hs38_smp_defconfig @@ -4,7 +4,6 @@ CONFIG_HIGH_RES_TIMERS=y CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y CONFIG_BLK_DEV_INITRD=y -CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3=y CONFIG_EMBEDDED=y CONFIG_PERF_EVENTS=y # CONFIG_VM_EVENT_COUNTERS is not set diff --git a/init/Kconfig b/init/Kconfig index c7900e8975f1..1b4d8acc3def 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -1401,13 +1401,6 @@ config CC_OPTIMIZE_FOR_PERFORMANCE with the "-O2" compiler flag for best performance and most helpful compile-time warnings. -config CC_OPTIMIZE_FOR_PERFORMANCE_O3 - bool "Optimize more for performance (-O3)" - depends on ARC - help - Choosing this option will pass "-O3" to your compiler to optimize - the kernel yet more for performance. - config CC_OPTIMIZE_FOR_SIZE bool "Optimize for size (-Os)" help -- 2.37.0.rc0.161.g10f37bed90-goog ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] kbuild: drop support for CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3 2022-06-28 21:04 ` [PATCH] kbuild: drop support for CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3 Nick Desaulniers @ 2022-06-29 10:48 ` Miko Larsson 2022-07-11 5:50 ` Masahiro Yamada 2022-07-11 5:05 ` Masahiro Yamada 1 sibling, 1 reply; 6+ messages in thread From: Miko Larsson @ 2022-06-29 10:48 UTC (permalink / raw) To: Masahiro Yamada, Linus Torvalds, Nick Desaulniers Cc: arnd, bigeasy, chris, dmitry.torokhov, gustavoars, john.ogness, linux-kbuild, linux-kernel, nathan, ndesaulniers, oleksandr, quic_eberman, seanjc, tglx, vbabka, x86, linux-snps-arc, Vineet Gupta On Tuesday, 28 June 2022 23:04:07 CEST Nick Desaulniers wrote: > The difference in most compilers between `-O3` and `-O2` is mostly down > to whether loops with statically determinable trip counts are fully > unrolled vs unrolled to a multiple of SIMD width. > > This patch is effectively a revert of > commit 15f5db60a137 ("kbuild,arc: add > CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3 for ARC") without re-adding > ARCH_CFLAGS > > Ever since > commit cfdbc2e16e65 ("ARC: Build system: Makefiles, Kconfig, Linker > script") > ARC has been built with -O3, though the reason for doing so was not > specified in inline comments or the commit message. This commit does not > re-add -O3 to arch/arc/Makefile. > > Folks looking to experiment with `-O3` (or any compiler flag for that > matter) may pass them along to the command line invocation of make: > > $ make KCFLAGS=-O3 > > Code that looks to re-add an explicit Kconfig option for `-O3` should > provide: > 1. A rigorous and reproducible performance profile of a reasonable > userspace workload that demonstrates a hot loop in the kernel that > would benefit from `-O3` over `-O2`. > 2. Disassembly of said loop body before and after. > 3. Provides stats on terms of increase in file size. > Might be worth cleaning up the rest of the kernel of instances of -O3, too. -O3 used to build lz4 and mips vdso, for instance. Might be a bit of a digression, though -- ~miko ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] kbuild: drop support for CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3 2022-06-29 10:48 ` Miko Larsson @ 2022-07-11 5:50 ` Masahiro Yamada 0 siblings, 0 replies; 6+ messages in thread From: Masahiro Yamada @ 2022-07-11 5:50 UTC (permalink / raw) To: Miko Larsson Cc: Linus Torvalds, Nick Desaulniers, Arnd Bergmann, Sebastian Andrzej Siewior, Chris Down, Dmitry Torokhov, Gustavo A. R. Silva, John Ogness, Linux Kbuild mailing list, Linux Kernel Mailing List, Nathan Chancellor, Oleksandr Natalenko, Elliot Berman, Sean Christopherson, Thomas Gleixner, Vlastimil Babka, X86 ML, arcml, Vineet Gupta On Wed, Jun 29, 2022 at 7:48 PM Miko Larsson <mikoxyzzz@gmail.com> wrote: > > On Tuesday, 28 June 2022 23:04:07 CEST Nick Desaulniers wrote: > > The difference in most compilers between `-O3` and `-O2` is mostly down > > to whether loops with statically determinable trip counts are fully > > unrolled vs unrolled to a multiple of SIMD width. > > > > This patch is effectively a revert of > > commit 15f5db60a137 ("kbuild,arc: add > > CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3 for ARC") without re-adding > > ARCH_CFLAGS > > > > Ever since > > commit cfdbc2e16e65 ("ARC: Build system: Makefiles, Kconfig, Linker > > script") > > ARC has been built with -O3, though the reason for doing so was not > > specified in inline comments or the commit message. This commit does not > > re-add -O3 to arch/arc/Makefile. > > > > Folks looking to experiment with `-O3` (or any compiler flag for that > > matter) may pass them along to the command line invocation of make: > > > > $ make KCFLAGS=-O3 > > > > Code that looks to re-add an explicit Kconfig option for `-O3` should > > provide: > > 1. A rigorous and reproducible performance profile of a reasonable > > userspace workload that demonstrates a hot loop in the kernel that > > would benefit from `-O3` over `-O2`. > > 2. Disassembly of said loop body before and after. > > 3. Provides stats on terms of increase in file size. > > > > Might be worth cleaning up the rest of the kernel of instances of -O3, > too. -O3 used to build lz4 and mips vdso, for instance. Might be a bit > of a digression, though This patch focuses on the removal of CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3, so I think it is OK as-is. The rest of cleanups, if needed, should be submitted separately. > > -- > ~miko > > -- Best Regards Masahiro Yamada ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] kbuild: drop support for CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3 2022-06-28 21:04 ` [PATCH] kbuild: drop support for CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3 Nick Desaulniers 2022-06-29 10:48 ` Miko Larsson @ 2022-07-11 5:05 ` Masahiro Yamada 1 sibling, 0 replies; 6+ messages in thread From: Masahiro Yamada @ 2022-07-11 5:05 UTC (permalink / raw) To: Nick Desaulniers Cc: Linus Torvalds, Arnd Bergmann, Sebastian Andrzej Siewior, Chris Down, Dmitry Torokhov, Gustavo A. R. Silva, John Ogness, Linux Kbuild mailing list, Linux Kernel Mailing List, Miko Larsson, Nathan Chancellor, Oleksandr Natalenko, Elliot Berman, Sean Christopherson, Thomas Gleixner, Vlastimil Babka, X86 ML, arcml, Vineet Gupta On Wed, Jun 29, 2022 at 6:06 AM Nick Desaulniers <ndesaulniers@google.com> wrote: > > The difference in most compilers between `-O3` and `-O2` is mostly down > to whether loops with statically determinable trip counts are fully > unrolled vs unrolled to a multiple of SIMD width. > > This patch is effectively a revert of > commit 15f5db60a137 ("kbuild,arc: add > CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3 for ARC") without re-adding > ARCH_CFLAGS > > Ever since > commit cfdbc2e16e65 ("ARC: Build system: Makefiles, Kconfig, Linker > script") > ARC has been built with -O3, though the reason for doing so was not > specified in inline comments or the commit message. This commit does not > re-add -O3 to arch/arc/Makefile. > > Folks looking to experiment with `-O3` (or any compiler flag for that > matter) may pass them along to the command line invocation of make: > > $ make KCFLAGS=-O3 > > Code that looks to re-add an explicit Kconfig option for `-O3` should > provide: > 1. A rigorous and reproducible performance profile of a reasonable > userspace workload that demonstrates a hot loop in the kernel that > would benefit from `-O3` over `-O2`. > 2. Disassembly of said loop body before and after. > 3. Provides stats on terms of increase in file size. > > Link: https://lore.kernel.org/linux-kbuild/CA+55aFz2sNBbZyg-_i8_Ldr2e8o9dfvdSfHHuRzVtP2VMAUWPg@mail.gmail.com/ > Signed-off-by: Nick Desaulniers <ndesaulniers@google.com> > --- Applied to linux-kbuild. Thanks. > Makefile | 2 -- > arch/arc/configs/axs101_defconfig | 1 - > arch/arc/configs/axs103_defconfig | 1 - > arch/arc/configs/axs103_smp_defconfig | 1 - > arch/arc/configs/haps_hs_defconfig | 1 - > arch/arc/configs/haps_hs_smp_defconfig | 1 - > arch/arc/configs/hsdk_defconfig | 1 - > arch/arc/configs/nsim_700_defconfig | 1 - > arch/arc/configs/nsimosci_defconfig | 1 - > arch/arc/configs/nsimosci_hs_defconfig | 1 - > arch/arc/configs/nsimosci_hs_smp_defconfig | 1 - > arch/arc/configs/tb10x_defconfig | 1 - > arch/arc/configs/vdk_hs38_defconfig | 1 - > arch/arc/configs/vdk_hs38_smp_defconfig | 1 - > init/Kconfig | 7 ------- > 15 files changed, 22 deletions(-) > > diff --git a/Makefile b/Makefile > index 8973b285ce6c..b69f6cd7f2e2 100644 > --- a/Makefile > +++ b/Makefile > @@ -755,8 +755,6 @@ KBUILD_CFLAGS += $(call cc-disable-warning, address-of-packed-member) > > ifdef CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE > KBUILD_CFLAGS += -O2 > -else ifdef CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3 > -KBUILD_CFLAGS += -O3 > else ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE > KBUILD_CFLAGS += -Os > endif > diff --git a/arch/arc/configs/axs101_defconfig b/arch/arc/configs/axs101_defconfig > index 0016149f9583..e31a8ebc3ecc 100644 > --- a/arch/arc/configs/axs101_defconfig > +++ b/arch/arc/configs/axs101_defconfig > @@ -9,7 +9,6 @@ CONFIG_NAMESPACES=y > # CONFIG_UTS_NS is not set > # CONFIG_PID_NS is not set > CONFIG_BLK_DEV_INITRD=y > -CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3=y > CONFIG_EMBEDDED=y > CONFIG_PERF_EVENTS=y > # CONFIG_VM_EVENT_COUNTERS is not set > diff --git a/arch/arc/configs/axs103_defconfig b/arch/arc/configs/axs103_defconfig > index 5b031582a1cf..e0e8567f0d75 100644 > --- a/arch/arc/configs/axs103_defconfig > +++ b/arch/arc/configs/axs103_defconfig > @@ -9,7 +9,6 @@ CONFIG_NAMESPACES=y > # CONFIG_UTS_NS is not set > # CONFIG_PID_NS is not set > CONFIG_BLK_DEV_INITRD=y > -CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3=y > CONFIG_EMBEDDED=y > CONFIG_PERF_EVENTS=y > # CONFIG_VM_EVENT_COUNTERS is not set > diff --git a/arch/arc/configs/axs103_smp_defconfig b/arch/arc/configs/axs103_smp_defconfig > index d4eec39e0112..fcbc952bc75b 100644 > --- a/arch/arc/configs/axs103_smp_defconfig > +++ b/arch/arc/configs/axs103_smp_defconfig > @@ -9,7 +9,6 @@ CONFIG_NAMESPACES=y > # CONFIG_UTS_NS is not set > # CONFIG_PID_NS is not set > CONFIG_BLK_DEV_INITRD=y > -CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3=y > CONFIG_EMBEDDED=y > CONFIG_PERF_EVENTS=y > # CONFIG_VM_EVENT_COUNTERS is not set > diff --git a/arch/arc/configs/haps_hs_defconfig b/arch/arc/configs/haps_hs_defconfig > index 7337cdf4ffdd..d87ad7e88d62 100644 > --- a/arch/arc/configs/haps_hs_defconfig > +++ b/arch/arc/configs/haps_hs_defconfig > @@ -11,7 +11,6 @@ CONFIG_NAMESPACES=y > # CONFIG_UTS_NS is not set > # CONFIG_PID_NS is not set > CONFIG_BLK_DEV_INITRD=y > -CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3=y > CONFIG_EXPERT=y > CONFIG_PERF_EVENTS=y > # CONFIG_COMPAT_BRK is not set > diff --git a/arch/arc/configs/haps_hs_smp_defconfig b/arch/arc/configs/haps_hs_smp_defconfig > index bc927221afc0..8d82cdb7f86a 100644 > --- a/arch/arc/configs/haps_hs_smp_defconfig > +++ b/arch/arc/configs/haps_hs_smp_defconfig > @@ -11,7 +11,6 @@ CONFIG_NAMESPACES=y > # CONFIG_UTS_NS is not set > # CONFIG_PID_NS is not set > CONFIG_BLK_DEV_INITRD=y > -CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3=y > CONFIG_EMBEDDED=y > CONFIG_PERF_EVENTS=y > # CONFIG_VM_EVENT_COUNTERS is not set > diff --git a/arch/arc/configs/hsdk_defconfig b/arch/arc/configs/hsdk_defconfig > index aa000075a575..f856b03e0fb5 100644 > --- a/arch/arc/configs/hsdk_defconfig > +++ b/arch/arc/configs/hsdk_defconfig > @@ -9,7 +9,6 @@ CONFIG_NAMESPACES=y > # CONFIG_PID_NS is not set > CONFIG_BLK_DEV_INITRD=y > CONFIG_BLK_DEV_RAM=y > -CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3=y > CONFIG_EMBEDDED=y > CONFIG_PERF_EVENTS=y > # CONFIG_VM_EVENT_COUNTERS is not set > diff --git a/arch/arc/configs/nsim_700_defconfig b/arch/arc/configs/nsim_700_defconfig > index 326f6cde7826..a1ce12bf5b16 100644 > --- a/arch/arc/configs/nsim_700_defconfig > +++ b/arch/arc/configs/nsim_700_defconfig > @@ -11,7 +11,6 @@ CONFIG_NAMESPACES=y > # CONFIG_UTS_NS is not set > # CONFIG_PID_NS is not set > CONFIG_BLK_DEV_INITRD=y > -CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3=y > CONFIG_KALLSYMS_ALL=y > CONFIG_EMBEDDED=y > CONFIG_PERF_EVENTS=y > diff --git a/arch/arc/configs/nsimosci_defconfig b/arch/arc/configs/nsimosci_defconfig > index bf39a0091679..ca10f4a2c823 100644 > --- a/arch/arc/configs/nsimosci_defconfig > +++ b/arch/arc/configs/nsimosci_defconfig > @@ -10,7 +10,6 @@ CONFIG_NAMESPACES=y > # CONFIG_UTS_NS is not set > # CONFIG_PID_NS is not set > CONFIG_BLK_DEV_INITRD=y > -CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3=y > CONFIG_KALLSYMS_ALL=y > CONFIG_EMBEDDED=y > CONFIG_PERF_EVENTS=y > diff --git a/arch/arc/configs/nsimosci_hs_defconfig b/arch/arc/configs/nsimosci_hs_defconfig > index 7121bd71c543..31b6ec3683c6 100644 > --- a/arch/arc/configs/nsimosci_hs_defconfig > +++ b/arch/arc/configs/nsimosci_hs_defconfig > @@ -10,7 +10,6 @@ CONFIG_NAMESPACES=y > # CONFIG_UTS_NS is not set > # CONFIG_PID_NS is not set > CONFIG_BLK_DEV_INITRD=y > -CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3=y > CONFIG_KALLSYMS_ALL=y > CONFIG_EMBEDDED=y > CONFIG_PERF_EVENTS=y > diff --git a/arch/arc/configs/nsimosci_hs_smp_defconfig b/arch/arc/configs/nsimosci_hs_smp_defconfig > index f9863b294a70..41a0037f48a5 100644 > --- a/arch/arc/configs/nsimosci_hs_smp_defconfig > +++ b/arch/arc/configs/nsimosci_hs_smp_defconfig > @@ -8,7 +8,6 @@ CONFIG_IKCONFIG_PROC=y > # CONFIG_UTS_NS is not set > # CONFIG_PID_NS is not set > CONFIG_BLK_DEV_INITRD=y > -CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3=y > CONFIG_PERF_EVENTS=y > # CONFIG_COMPAT_BRK is not set > CONFIG_KPROBES=y > diff --git a/arch/arc/configs/tb10x_defconfig b/arch/arc/configs/tb10x_defconfig > index a12656ec0072..d93b65008d4a 100644 > --- a/arch/arc/configs/tb10x_defconfig > +++ b/arch/arc/configs/tb10x_defconfig > @@ -14,7 +14,6 @@ CONFIG_INITRAMFS_SOURCE="../tb10x-rootfs.cpio" > CONFIG_INITRAMFS_ROOT_UID=2100 > CONFIG_INITRAMFS_ROOT_GID=501 > # CONFIG_RD_GZIP is not set > -CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3=y > CONFIG_KALLSYMS_ALL=y > # CONFIG_AIO is not set > CONFIG_EMBEDDED=y > diff --git a/arch/arc/configs/vdk_hs38_defconfig b/arch/arc/configs/vdk_hs38_defconfig > index d7c858df520c..0c3b21416819 100644 > --- a/arch/arc/configs/vdk_hs38_defconfig > +++ b/arch/arc/configs/vdk_hs38_defconfig > @@ -4,7 +4,6 @@ CONFIG_HIGH_RES_TIMERS=y > CONFIG_IKCONFIG=y > CONFIG_IKCONFIG_PROC=y > CONFIG_BLK_DEV_INITRD=y > -CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3=y > CONFIG_EMBEDDED=y > CONFIG_PERF_EVENTS=y > # CONFIG_VM_EVENT_COUNTERS is not set > diff --git a/arch/arc/configs/vdk_hs38_smp_defconfig b/arch/arc/configs/vdk_hs38_smp_defconfig > index 015c1d43889e..f9ad9d3ee702 100644 > --- a/arch/arc/configs/vdk_hs38_smp_defconfig > +++ b/arch/arc/configs/vdk_hs38_smp_defconfig > @@ -4,7 +4,6 @@ CONFIG_HIGH_RES_TIMERS=y > CONFIG_IKCONFIG=y > CONFIG_IKCONFIG_PROC=y > CONFIG_BLK_DEV_INITRD=y > -CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3=y > CONFIG_EMBEDDED=y > CONFIG_PERF_EVENTS=y > # CONFIG_VM_EVENT_COUNTERS is not set > diff --git a/init/Kconfig b/init/Kconfig > index c7900e8975f1..1b4d8acc3def 100644 > --- a/init/Kconfig > +++ b/init/Kconfig > @@ -1401,13 +1401,6 @@ config CC_OPTIMIZE_FOR_PERFORMANCE > with the "-O2" compiler flag for best performance and most > helpful compile-time warnings. > > -config CC_OPTIMIZE_FOR_PERFORMANCE_O3 > - bool "Optimize more for performance (-O3)" > - depends on ARC > - help > - Choosing this option will pass "-O3" to your compiler to optimize > - the kernel yet more for performance. > - > config CC_OPTIMIZE_FOR_SIZE > bool "Optimize for size (-Os)" > help > -- > 2.37.0.rc0.161.g10f37bed90-goog > -- Best Regards Masahiro Yamada ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-07-11 5:52 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-24 18:29 [PATCH 0/2] Kconfig: -O3 enablement Linus Torvalds
[not found] ` <CA+55aFyugRmHNV1BbhB_YHf3mgaiU6ND_KL8bu0PPEaRVNwWHg@mail.gmail.com>
2022-06-24 18:38 ` Linus Torvalds
2022-06-28 21:04 ` [PATCH] kbuild: drop support for CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3 Nick Desaulniers
2022-06-29 10:48 ` Miko Larsson
2022-07-11 5:50 ` Masahiro Yamada
2022-07-11 5:05 ` Masahiro Yamada
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®