From 58afaac038c8a2235552f3b69c35045ac96c7329 Mon Sep 17 00:00:00 2001 From: Chris Redpath Date: Sat, 21 Oct 2017 16:47:56 +0100 Subject: [PATCH] ANDROID: sched: Add KConfig option to set ENERGY_AWARE sched feature on This option defaults the ENERGY_AWARE scheduling feature to true, as without SCHED_DEBUG set this feature can't be enabled or disabled via sysctl. Change-Id: Ibf8e5d9d8aedf5cc8f0ef322279209ca65a9786b Signed-off-by: Chris Redpath --- init/Kconfig | 10 ++++++++++ kernel/sched/features.h | 4 ++++ 2 files changed, 14 insertions(+) diff --git a/init/Kconfig b/init/Kconfig index 3c1faaa2af4a..0e4f10d48d86 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -959,6 +959,16 @@ config SCHED_AUTOGROUP desktop applications. Task group autogeneration is currently based upon task session. +config DEFAULT_USE_ENERGY_AWARE + bool "Default to enabling the Energy Aware Scheduler feature" + default n + help + This option defaults the ENERGY_AWARE scheduling feature to true, + as without SCHED_DEBUG set this feature can't be enabled or disabled + via sysctl. + + Say N if unsure. + config SYSFS_DEPRECATED bool "Enable deprecated sysfs features to support old userspace tools" depends on SYSFS diff --git a/kernel/sched/features.h b/kernel/sched/features.h index 8be01be159f6..4de080d76d05 100644 --- a/kernel/sched/features.h +++ b/kernel/sched/features.h @@ -90,4 +90,8 @@ SCHED_FEAT(WA_BIAS, true) * Energy aware scheduling. Use platform energy model to guide scheduling * decisions optimizing for energy efficiency. */ +#ifdef CONFIG_DEFAULT_USE_ENERGY_AWARE +SCHED_FEAT(ENERGY_AWARE, true) +#else SCHED_FEAT(ENERGY_AWARE, false) +#endif