From 2d998ea99bd650aafc270f5d0599fc0b8d2c0ce7 Mon Sep 17 00:00:00 2001 From: Alex Naidis Date: Sat, 10 Jun 2017 22:34:23 +0200 Subject: [PATCH] libcutils: Clarify schedboost_enabled() Commit 795267d4c748 ("Removed cpusets/schedboost build time dependency.") turned the cpusets and schedtune options into runtime decisions. However the kernel option which is mentioned in the code comment (CONFIG_SCHEDTUNE) is very misleading as it doesn't exist (CONFIG_SCHED_TUNE does exist) and it doesn't describe the real functionality of the method. schedboost_enabled() will still return false if CONFIG_SCHED_TUNE is set in the kernel but CONFIG_CGROUP_SCHEDTUNE is not. So to clarify this, we need to change the comment to reflect that CONFIG_CGROUP_SCHEDTUNE, which depends on CONFIG_SCHED_TUNE, is required. Signed-off-by: Alex Naidis --- libcutils/include/cutils/sched_policy.h | 2 +- libcutils/sched_policy.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libcutils/include/cutils/sched_policy.h b/libcutils/include/cutils/sched_policy.h index 15391d981..cf8f5c384 100644 --- a/libcutils/include/cutils/sched_policy.h +++ b/libcutils/include/cutils/sched_policy.h @@ -34,7 +34,7 @@ extern bool cpusets_enabled(); * Check if Linux kernel enables SCHEDTUNE feature (only available in Android * common kernel or Linaro LSK, not in mainline Linux as of v4.9) * - * Return value: 1 if Linux kernel CONFIG_SCHEDTUNE=y; 0 otherwise. + * Return value: 1 if Linux kernel CONFIG_CGROUP_SCHEDTUNE=y; 0 otherwise. */ extern bool schedboost_enabled(); diff --git a/libcutils/sched_policy.cpp b/libcutils/sched_policy.cpp index 7e385355f..4c303e6b1 100644 --- a/libcutils/sched_policy.cpp +++ b/libcutils/sched_policy.cpp @@ -136,7 +136,7 @@ bool cpusets_enabled() { /* Similar to CONFIG_CPUSETS above, but with a different configuration - CONFIG_SCHEDTUNE that's in Android common Linux kernel and Linaro + CONFIG_CGROUP_SCHEDTUNE that's in Android common Linux kernel and Linaro Stable Kernel (LSK), but not in mainline Linux as of v4.9. With runtime check using the following function, build time