Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

kbuild: drop support for CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3

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>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>

authored by

Nick Desaulniers and committed by
Masahiro Yamada
a6036a41 5439d4d4

-22
-2
Makefile
··· 755 755 756 756 ifdef CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE 757 757 KBUILD_CFLAGS += -O2 758 - else ifdef CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3 759 - KBUILD_CFLAGS += -O3 760 758 else ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE 761 759 KBUILD_CFLAGS += -Os 762 760 endif
-1
arch/arc/configs/axs101_defconfig
··· 9 9 # CONFIG_UTS_NS is not set 10 10 # CONFIG_PID_NS is not set 11 11 CONFIG_BLK_DEV_INITRD=y 12 - CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3=y 13 12 CONFIG_EMBEDDED=y 14 13 CONFIG_PERF_EVENTS=y 15 14 # CONFIG_VM_EVENT_COUNTERS is not set
-1
arch/arc/configs/axs103_defconfig
··· 9 9 # CONFIG_UTS_NS is not set 10 10 # CONFIG_PID_NS is not set 11 11 CONFIG_BLK_DEV_INITRD=y 12 - CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3=y 13 12 CONFIG_EMBEDDED=y 14 13 CONFIG_PERF_EVENTS=y 15 14 # CONFIG_VM_EVENT_COUNTERS is not set
-1
arch/arc/configs/axs103_smp_defconfig
··· 9 9 # CONFIG_UTS_NS is not set 10 10 # CONFIG_PID_NS is not set 11 11 CONFIG_BLK_DEV_INITRD=y 12 - CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3=y 13 12 CONFIG_EMBEDDED=y 14 13 CONFIG_PERF_EVENTS=y 15 14 # CONFIG_VM_EVENT_COUNTERS is not set
-1
arch/arc/configs/haps_hs_defconfig
··· 11 11 # CONFIG_UTS_NS is not set 12 12 # CONFIG_PID_NS is not set 13 13 CONFIG_BLK_DEV_INITRD=y 14 - CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3=y 15 14 CONFIG_EXPERT=y 16 15 CONFIG_PERF_EVENTS=y 17 16 # CONFIG_COMPAT_BRK is not set
-1
arch/arc/configs/haps_hs_smp_defconfig
··· 11 11 # CONFIG_UTS_NS is not set 12 12 # CONFIG_PID_NS is not set 13 13 CONFIG_BLK_DEV_INITRD=y 14 - CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3=y 15 14 CONFIG_EMBEDDED=y 16 15 CONFIG_PERF_EVENTS=y 17 16 # CONFIG_VM_EVENT_COUNTERS is not set
-1
arch/arc/configs/hsdk_defconfig
··· 9 9 # CONFIG_PID_NS is not set 10 10 CONFIG_BLK_DEV_INITRD=y 11 11 CONFIG_BLK_DEV_RAM=y 12 - CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3=y 13 12 CONFIG_EMBEDDED=y 14 13 CONFIG_PERF_EVENTS=y 15 14 # CONFIG_VM_EVENT_COUNTERS is not set
-1
arch/arc/configs/nsim_700_defconfig
··· 11 11 # CONFIG_UTS_NS is not set 12 12 # CONFIG_PID_NS is not set 13 13 CONFIG_BLK_DEV_INITRD=y 14 - CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3=y 15 14 CONFIG_KALLSYMS_ALL=y 16 15 CONFIG_EMBEDDED=y 17 16 CONFIG_PERF_EVENTS=y
-1
arch/arc/configs/nsimosci_defconfig
··· 10 10 # CONFIG_UTS_NS is not set 11 11 # CONFIG_PID_NS is not set 12 12 CONFIG_BLK_DEV_INITRD=y 13 - CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3=y 14 13 CONFIG_KALLSYMS_ALL=y 15 14 CONFIG_EMBEDDED=y 16 15 CONFIG_PERF_EVENTS=y
-1
arch/arc/configs/nsimosci_hs_defconfig
··· 10 10 # CONFIG_UTS_NS is not set 11 11 # CONFIG_PID_NS is not set 12 12 CONFIG_BLK_DEV_INITRD=y 13 - CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3=y 14 13 CONFIG_KALLSYMS_ALL=y 15 14 CONFIG_EMBEDDED=y 16 15 CONFIG_PERF_EVENTS=y
-1
arch/arc/configs/nsimosci_hs_smp_defconfig
··· 8 8 # CONFIG_UTS_NS is not set 9 9 # CONFIG_PID_NS is not set 10 10 CONFIG_BLK_DEV_INITRD=y 11 - CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3=y 12 11 CONFIG_PERF_EVENTS=y 13 12 # CONFIG_COMPAT_BRK is not set 14 13 CONFIG_KPROBES=y
-1
arch/arc/configs/tb10x_defconfig
··· 14 14 CONFIG_INITRAMFS_ROOT_UID=2100 15 15 CONFIG_INITRAMFS_ROOT_GID=501 16 16 # CONFIG_RD_GZIP is not set 17 - CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3=y 18 17 CONFIG_KALLSYMS_ALL=y 19 18 # CONFIG_AIO is not set 20 19 CONFIG_EMBEDDED=y
-1
arch/arc/configs/vdk_hs38_defconfig
··· 4 4 CONFIG_IKCONFIG=y 5 5 CONFIG_IKCONFIG_PROC=y 6 6 CONFIG_BLK_DEV_INITRD=y 7 - CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3=y 8 7 CONFIG_EMBEDDED=y 9 8 CONFIG_PERF_EVENTS=y 10 9 # CONFIG_VM_EVENT_COUNTERS is not set
-1
arch/arc/configs/vdk_hs38_smp_defconfig
··· 4 4 CONFIG_IKCONFIG=y 5 5 CONFIG_IKCONFIG_PROC=y 6 6 CONFIG_BLK_DEV_INITRD=y 7 - CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3=y 8 7 CONFIG_EMBEDDED=y 9 8 CONFIG_PERF_EVENTS=y 10 9 # CONFIG_VM_EVENT_COUNTERS is not set
-7
init/Kconfig
··· 1401 1401 with the "-O2" compiler flag for best performance and most 1402 1402 helpful compile-time warnings. 1403 1403 1404 - config CC_OPTIMIZE_FOR_PERFORMANCE_O3 1405 - bool "Optimize more for performance (-O3)" 1406 - depends on ARC 1407 - help 1408 - Choosing this option will pass "-O3" to your compiler to optimize 1409 - the kernel yet more for performance. 1410 - 1411 1404 config CC_OPTIMIZE_FOR_SIZE 1412 1405 bool "Optimize for size (-Os)" 1413 1406 help