]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - queue-4.4/x86-kconfig-select-sched_smt-if-smp-enabled.patch
4.4-stable patches
[thirdparty/kernel/stable-queue.git] / queue-4.4 / x86-kconfig-select-sched_smt-if-smp-enabled.patch
CommitLineData
1f91e7a4
GKH
1From foo@baz Tue 14 May 2019 08:29:35 PM CEST
2From: Thomas Gleixner <tglx@linutronix.de>
3Date: Sun, 25 Nov 2018 19:33:37 +0100
4Subject: x86/Kconfig: Select SCHED_SMT if SMP enabled
5
6From: Thomas Gleixner <tglx@linutronix.de>
7
8commit dbe733642e01dd108f71436aaea7b328cb28fd87 upstream.
9
10CONFIG_SCHED_SMT is enabled by all distros, so there is not a real point to
11have it configurable. The runtime overhead in the core scheduler code is
12minimal because the actual SMT scheduling parts are conditional on a static
13key.
14
15This allows to expose the scheduler's SMT state static key to the
16speculation control code. Alternatively the scheduler's static key could be
17made always available when CONFIG_SMP is enabled, but that's just adding an
18unused static key to every other architecture for nothing.
19
20Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
21Reviewed-by: Ingo Molnar <mingo@kernel.org>
22Cc: Peter Zijlstra <peterz@infradead.org>
23Cc: Andy Lutomirski <luto@kernel.org>
24Cc: Linus Torvalds <torvalds@linux-foundation.org>
25Cc: Jiri Kosina <jkosina@suse.cz>
26Cc: Tom Lendacky <thomas.lendacky@amd.com>
27Cc: Josh Poimboeuf <jpoimboe@redhat.com>
28Cc: Andrea Arcangeli <aarcange@redhat.com>
29Cc: David Woodhouse <dwmw@amazon.co.uk>
30Cc: Tim Chen <tim.c.chen@linux.intel.com>
31Cc: Andi Kleen <ak@linux.intel.com>
32Cc: Dave Hansen <dave.hansen@intel.com>
33Cc: Casey Schaufler <casey.schaufler@intel.com>
34Cc: Asit Mallick <asit.k.mallick@intel.com>
35Cc: Arjan van de Ven <arjan@linux.intel.com>
36Cc: Jon Masters <jcm@redhat.com>
37Cc: Waiman Long <longman9394@gmail.com>
38Cc: Greg KH <gregkh@linuxfoundation.org>
39Cc: Dave Stewart <david.c.stewart@intel.com>
40Cc: Kees Cook <keescook@chromium.org>
41Link: https://lkml.kernel.org/r/20181125185004.337452245@linutronix.de
42Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
43Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
44---
45 arch/x86/Kconfig | 8 +-------
46 1 file changed, 1 insertion(+), 7 deletions(-)
47
48--- a/arch/x86/Kconfig
49+++ b/arch/x86/Kconfig
50@@ -893,13 +893,7 @@ config NR_CPUS
51 approximately eight kilobytes to the kernel image.
52
53 config SCHED_SMT
54- bool "SMT (Hyperthreading) scheduler support"
55- depends on SMP
56- ---help---
57- SMT scheduler support improves the CPU scheduler's decision making
58- when dealing with Intel Pentium 4 chips with HyperThreading at a
59- cost of slightly increased overhead in some places. If unsure say
60- N here.
61+ def_bool y if SMP
62
63 config SCHED_MC
64 def_bool y