]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - queue-4.9/0029-x86-Kconfig-Select-SCHED_SMT-if-SMP-enabled.patch
4.9-stable patches
[thirdparty/kernel/stable-queue.git] / queue-4.9 / 0029-x86-Kconfig-Select-SCHED_SMT-if-SMP-enabled.patch
CommitLineData
6fa88700
GKH
1From 8bc14bbefa6633971fd5f87b1410a6c9adf949a1 Mon Sep 17 00:00:00 2001
2From: Thomas Gleixner <tglx@linutronix.de>
3Date: Sun, 25 Nov 2018 19:33:37 +0100
4Subject: [PATCH 29/76] x86/Kconfig: Select SCHED_SMT if SMP enabled
5
6commit dbe733642e01dd108f71436aaea7b328cb28fd87 upstream.
7
8CONFIG_SCHED_SMT is enabled by all distros, so there is not a real point to
9have it configurable. The runtime overhead in the core scheduler code is
10minimal because the actual SMT scheduling parts are conditional on a static
11key.
12
13This allows to expose the scheduler's SMT state static key to the
14speculation control code. Alternatively the scheduler's static key could be
15made always available when CONFIG_SMP is enabled, but that's just adding an
16unused static key to every other architecture for nothing.
17
18Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
19Reviewed-by: Ingo Molnar <mingo@kernel.org>
20Cc: Peter Zijlstra <peterz@infradead.org>
21Cc: Andy Lutomirski <luto@kernel.org>
22Cc: Linus Torvalds <torvalds@linux-foundation.org>
23Cc: Jiri Kosina <jkosina@suse.cz>
24Cc: Tom Lendacky <thomas.lendacky@amd.com>
25Cc: Josh Poimboeuf <jpoimboe@redhat.com>
26Cc: Andrea Arcangeli <aarcange@redhat.com>
27Cc: David Woodhouse <dwmw@amazon.co.uk>
28Cc: Tim Chen <tim.c.chen@linux.intel.com>
29Cc: Andi Kleen <ak@linux.intel.com>
30Cc: Dave Hansen <dave.hansen@intel.com>
31Cc: Casey Schaufler <casey.schaufler@intel.com>
32Cc: Asit Mallick <asit.k.mallick@intel.com>
33Cc: Arjan van de Ven <arjan@linux.intel.com>
34Cc: Jon Masters <jcm@redhat.com>
35Cc: Waiman Long <longman9394@gmail.com>
36Cc: Greg KH <gregkh@linuxfoundation.org>
37Cc: Dave Stewart <david.c.stewart@intel.com>
38Cc: Kees Cook <keescook@chromium.org>
39Link: https://lkml.kernel.org/r/20181125185004.337452245@linutronix.de
40Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
41Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
42---
43 arch/x86/Kconfig | 8 +-------
44 1 file changed, 1 insertion(+), 7 deletions(-)
45
46diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
47index 5a4591ff8407..e0055b4302d6 100644
48--- a/arch/x86/Kconfig
49+++ b/arch/x86/Kconfig
50@@ -937,13 +937,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
65--
662.21.0
67