libprocessgroup: Remove schedtune support
Schedtune was an out of tree cgroup controller present in Android
kernels up to 4.19. It was replaced with uclamp and the cpu controller.
Now that 4.19 is EOL and unsupported, and schedtune is not present in
any supported Android kernels, remove the userspace support for
schedtune.
Bug: 362504801
Change-Id: If8baaf1a616984c5dbaac1bbd03e23ad001bc29c
diff --git a/libprocessgroup/sched_policy.cpp b/libprocessgroup/sched_policy.cpp
index 042bcd2..5a53c35 100644
--- a/libprocessgroup/sched_policy.cpp
+++ b/libprocessgroup/sched_policy.cpp
@@ -148,20 +148,10 @@
return enabled;
}
-static bool schedtune_enabled() {
- return (CgroupMap::GetInstance().FindController("schedtune").IsUsable());
-}
-
static bool cpuctl_enabled() {
return (CgroupMap::GetInstance().FindController("cpu").IsUsable());
}
-bool schedboost_enabled() {
- static bool enabled = schedtune_enabled() || cpuctl_enabled();
-
- return enabled;
-}
-
static int getCGroupSubsys(pid_t tid, const char* subsys, std::string& subgroup) {
auto controller = CgroupMap::GetInstance().FindController(subsys);
@@ -201,9 +191,8 @@
}
std::string group;
- if (schedboost_enabled()) {
- if ((getCGroupSubsys(tid, "schedtune", group) < 0) &&
- (getCGroupSubsys(tid, "cpu", group) < 0)) {
+ if (cpuctl_enabled()) {
+ if (getCGroupSubsys(tid, "cpu", group) < 0) {
LOG(ERROR) << "Failed to find cpu cgroup for tid " << tid;
return -1;
}