sched: Add Kconfig option DEFAULT_USE_ENERGY_AWARE to set ENERGY_AWARE feature flag
authorJohn Stultz <john.stultz@linaro.org>
Wed, 21 Sep 2016 01:42:22 +0000 (18:42 -0700)
committerAmit Pundir <amit.pundir@linaro.org>
Wed, 12 Oct 2016 12:04:22 +0000 (17:34 +0530)
The ENERGY_AWARE sched feature flag cannot be set unless
CONFIG_SCHED_DEBUG is enabled.

So this patch allows the flag to default to true at build time
if the config is set.

Change-Id: I8835a571fdb7a8f8ee6a54af1e11a69f3b5ce8e6
Signed-off-by: John Stultz <john.stultz@linaro.org>
init/Kconfig
kernel/sched/features.h

index e71e35cf723c954166ff5664feee30fac635948d..acb6645ffda54b44c3e8350d9b67319a98929a76 100644 (file)
@@ -1290,6 +1290,16 @@ config SCHED_TUNE
 
          If unsure, say N.
 
+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
index b634151ce286851a4802a8e3316222f9efa1d62a..55e461055332971c2d5b0e9a036b462050d57144 100644 (file)
@@ -73,4 +73,8 @@ SCHED_FEAT(ATTACH_AGE_LOAD, 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