From a6036a41bffba3d5007e377483b425d470ad8042 Mon Sep 17 00:00:00 2001 From: Nick Desaulniers Date: Tue, 28 Jun 2022 14:04:07 -0700 Subject: 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 Signed-off-by: Masahiro Yamada --- init/Kconfig | 7 ------- 1 file changed, 7 deletions(-) (limited to 'init/Kconfig') 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 -- cgit v1.2.3-59-g8ed1b From bdf0fe33a4dc57e6397d90a4e024f7bbf89b1c08 Mon Sep 17 00:00:00 2001 From: Baruch Siach Date: Thu, 7 Jul 2022 07:43:29 +0300 Subject: init/Kconfig: update KALLSYMS_ALL help text CONFIG_KALLSYMS_ALL is required for kernel live patching which is a common use case that is enabled in some major distros. Update the Kconfig help text to reflect that. While at it, s/e.g./i.e./ to match the text intention. Signed-off-by: Baruch Siach Signed-off-by: Masahiro Yamada --- init/Kconfig | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'init/Kconfig') diff --git a/init/Kconfig b/init/Kconfig index 1b4d8acc3def..db5257bebc18 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -1715,16 +1715,17 @@ config KALLSYMS_ALL help Normally kallsyms only contains the symbols of functions for nicer OOPS messages and backtraces (i.e., symbols from the text and inittext - sections). This is sufficient for most cases. And only in very rare - cases (e.g., when a debugger is used) all symbols are required (e.g., - names of variables from the data sections, etc). + sections). This is sufficient for most cases. And only if you want to + enable kernel live patching, or other less common use cases (e.g., + when a debugger is used) all symbols are required (i.e., names of + variables from the data sections, etc). This option makes sure that all symbols are loaded into the kernel image (i.e., symbols from all sections) in cost of increased kernel size (depending on the kernel configuration, it may be 300KiB or something like this). - Say N unless you really need all symbols. + Say N unless you really need all symbols, or kernel live patching. config KALLSYMS_ABSOLUTE_PERCPU bool -- cgit v1.2.3-59-g8ed1b