aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Chen <tim.c.chen@linux.intel.com>2016-11-29 13:43:27 -0500
committerIngo Molnar <mingo@kernel.org>2016-11-30 02:27:08 -0500
commitde966cf4a4fa8d4e0357b08204bc791f34deb3fb (patch)
tree455d257b887ca07f1ef30959feaf28dc3a984f05
parenta293b3954a9d46cf60073616e8ace3c72e3b2f45 (diff)
sched/x86: Change CONFIG_SCHED_ITMT to CONFIG_SCHED_MC_PRIO
Rename CONFIG_SCHED_ITMT for Intel Turbo Boost Max Technology 3.0 to CONFIG_SCHED_MC_PRIO. This makes the configuration extensible in future to other architectures that wish to similarly establish CPU core priorities support in the scheduler. The description in Kconfig is updated to reflect this change with added details for better clarity. The configuration is explicitly default-y, to enable the feature on CPUs that have this feature. It has no effect on non-TBM3 CPUs. Signed-off-by: Tim Chen <tim.c.chen@linux.intel.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: bp@suse.de Cc: jolsa@redhat.com Cc: linux-acpi@vger.kernel.org Cc: linux-pm@vger.kernel.org Cc: rjw@rjwysocki.net Link: http://lkml.kernel.org/r/2b2ee29d93e3f162922d72d0165a1405864fbb23.1480444902.git.tim.c.chen@linux.intel.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r--arch/x86/Kconfig22
-rw-r--r--arch/x86/include/asm/topology.h6
-rw-r--r--arch/x86/kernel/Makefile2
-rw-r--r--drivers/acpi/bus.c2
-rw-r--r--drivers/cpufreq/Kconfig.x862
5 files changed, 22 insertions, 12 deletions
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 25950f0ccc33..715c1f3664c4 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -939,14 +939,24 @@ config SCHED_MC
939 making when dealing with multi-core CPU chips at a cost of slightly 939 making when dealing with multi-core CPU chips at a cost of slightly
940 increased overhead in some places. If unsure say N here. 940 increased overhead in some places. If unsure say N here.
941 941
942config SCHED_ITMT 942config SCHED_MC_PRIO
943 bool "Intel Turbo Boost Max Technology (ITMT) scheduler support" 943 bool "CPU core priorities scheduler support"
944 depends on SCHED_MC && CPU_SUP_INTEL && X86_INTEL_PSTATE 944 depends on SCHED_MC && CPU_SUP_INTEL && X86_INTEL_PSTATE
945 default y
945 ---help--- 946 ---help---
946 ITMT enabled scheduler support improves the CPU scheduler's decision 947 Intel Turbo Boost Max Technology 3.0 enabled CPUs have a
947 to move tasks to cpu core that can be boosted to a higher frequency 948 core ordering determined at manufacturing time, which allows
948 than others. It will have better performance at a cost of slightly 949 certain cores to reach higher turbo frequencies (when running
949 increased overhead in task migrations. If unsure say N here. 950 single threaded workloads) than others.
951
952 Enabling this kernel feature teaches the scheduler about
953 the TBM3 (aka ITMT) priority order of the CPU cores and adjusts the
954 scheduler's CPU selection logic accordingly, so that higher
955 overall system performance can be achieved.
956
957 This feature will have no effect on CPUs without this feature.
958
959 If unsure say Y here.
950 960
951source "kernel/Kconfig.preempt" 961source "kernel/Kconfig.preempt"
952 962
diff --git a/arch/x86/include/asm/topology.h b/arch/x86/include/asm/topology.h
index 4813df5c21f0..6358a85e2270 100644
--- a/arch/x86/include/asm/topology.h
+++ b/arch/x86/include/asm/topology.h
@@ -148,7 +148,7 @@ void x86_pci_root_bus_resources(int bus, struct list_head *resources);
148 148
149extern bool x86_topology_update; 149extern bool x86_topology_update;
150 150
151#ifdef CONFIG_SCHED_ITMT 151#ifdef CONFIG_SCHED_MC_PRIO
152#include <asm/percpu.h> 152#include <asm/percpu.h>
153 153
154DECLARE_PER_CPU_READ_MOSTLY(int, sched_core_priority); 154DECLARE_PER_CPU_READ_MOSTLY(int, sched_core_priority);
@@ -163,7 +163,7 @@ int sched_set_itmt_support(void);
163/* Interface to notify scheduler that system revokes ITMT support */ 163/* Interface to notify scheduler that system revokes ITMT support */
164void sched_clear_itmt_support(void); 164void sched_clear_itmt_support(void);
165 165
166#else /* CONFIG_SCHED_ITMT */ 166#else /* CONFIG_SCHED_MC_PRIO */
167 167
168#define sysctl_sched_itmt_enabled 0 168#define sysctl_sched_itmt_enabled 0
169static inline void sched_set_itmt_core_prio(int prio, int core_cpu) 169static inline void sched_set_itmt_core_prio(int prio, int core_cpu)
@@ -176,6 +176,6 @@ static inline int sched_set_itmt_support(void)
176static inline void sched_clear_itmt_support(void) 176static inline void sched_clear_itmt_support(void)
177{ 177{
178} 178}
179#endif /* CONFIG_SCHED_ITMT */ 179#endif /* CONFIG_SCHED_MC_PRIO */
180 180
181#endif /* _ASM_X86_TOPOLOGY_H */ 181#endif /* _ASM_X86_TOPOLOGY_H */
diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile
index bbd0ebcfcc2a..05110c1097ae 100644
--- a/arch/x86/kernel/Makefile
+++ b/arch/x86/kernel/Makefile
@@ -123,7 +123,7 @@ obj-$(CONFIG_EFI) += sysfb_efi.o
123 123
124obj-$(CONFIG_PERF_EVENTS) += perf_regs.o 124obj-$(CONFIG_PERF_EVENTS) += perf_regs.o
125obj-$(CONFIG_TRACING) += tracepoint.o 125obj-$(CONFIG_TRACING) += tracepoint.o
126obj-$(CONFIG_SCHED_ITMT) += itmt.o 126obj-$(CONFIG_SCHED_MC_PRIO) += itmt.o
127 127
128ifdef CONFIG_FRAME_POINTER 128ifdef CONFIG_FRAME_POINTER
129obj-y += unwind_frame.o 129obj-y += unwind_frame.o
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
index 806db0d6e6e8..5cbefd7621f0 100644
--- a/drivers/acpi/bus.c
+++ b/drivers/acpi/bus.c
@@ -338,7 +338,7 @@ static void acpi_bus_osc_support(void)
338 } 338 }
339#endif 339#endif
340 340
341 if (IS_ENABLED(CONFIG_SCHED_ITMT)) 341 if (IS_ENABLED(CONFIG_SCHED_MC_PRIO))
342 capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_CPC_DIVERSE_HIGH_SUPPORT; 342 capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_CPC_DIVERSE_HIGH_SUPPORT;
343 343
344 if (!ghes_disable) 344 if (!ghes_disable)
diff --git a/drivers/cpufreq/Kconfig.x86 b/drivers/cpufreq/Kconfig.x86
index c6d273b43ff9..35f71825b7f3 100644
--- a/drivers/cpufreq/Kconfig.x86
+++ b/drivers/cpufreq/Kconfig.x86
@@ -6,7 +6,7 @@ config X86_INTEL_PSTATE
6 bool "Intel P state control" 6 bool "Intel P state control"
7 depends on X86 7 depends on X86
8 select ACPI_PROCESSOR if ACPI 8 select ACPI_PROCESSOR if ACPI
9 select ACPI_CPPC_LIB if X86_64 && ACPI && SCHED_ITMT 9 select ACPI_CPPC_LIB if X86_64 && ACPI && SCHED_MC_PRIO
10 help 10 help
11 This driver provides a P state for Intel core processors. 11 This driver provides a P state for Intel core processors.
12 The driver implements an internal governor and will become 12 The driver implements an internal governor and will become