summaryrefslogtreecommitdiff
authorJohn Stultz <john.stultz@linaro.org>2016-09-21 01:42:22 (GMT)
committer Dmitry Shmidt <dimitrysh@google.com>2017-02-08 21:46:01 (GMT)
commitac82d16f334316179826c93cd61abe838812b7db (patch)
tree816cbcd1586ca10e615cf4c722338cefe6d31100
parentf2dd18a00f1b20cc84aa3b5e99991fff789d2cfd (diff)
downloadcommon-ac82d16f334316179826c93cd61abe838812b7db.zip
common-ac82d16f334316179826c93cd61abe838812b7db.tar.gz
common-ac82d16f334316179826c93cd61abe838812b7db.tar.bz2
ANDROID: sched: Add Kconfig option DEFAULT_USE_ENERGY_AWARE to set ENERGY_AWARE feature flag
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>
Diffstat
-rw-r--r--init/Kconfig10
-rw-r--r--kernel/sched/features.h4
2 files changed, 14 insertions, 0 deletions
diff --git a/init/Kconfig b/init/Kconfig
index d7dd52f..2e15b93 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -1360,6 +1360,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
diff --git a/kernel/sched/features.h b/kernel/sched/features.h
index b634151..55e4610 100644
--- a/kernel/sched/features.h
+++ b/kernel/sched/features.h
@@ -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