Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 981664df authored by T.J. Mercier's avatar T.J. Mercier
Browse files

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
parent aa56f29f
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -67,13 +67,6 @@ static void AssertPolicy(SchedPolicy expected_policy) {
}

TEST(SchedPolicy, set_sched_policy) {
    if (!schedboost_enabled()) {
        // schedboost_enabled() (i.e. CONFIG_CGROUP_SCHEDTUNE) is optional;
        // it's only needed on devices using energy-aware scheduler.
        GTEST_LOG_(INFO) << "skipping test that requires CONFIG_CGROUP_SCHEDTUNE";
        return;
    }

    ASSERT_EQ(0, set_sched_policy(0, SP_BACKGROUND));
    ASSERT_EQ(0, set_cpuset_policy(0, SP_BACKGROUND));
    AssertPolicy(SP_BACKGROUND);
+0 −8
Original line number Diff line number Diff line
@@ -29,14 +29,6 @@ extern "C" {
 */
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_CGROUP_SCHEDTUNE=y; 0 otherwise.
 */
extern bool schedboost_enabled();

/* Keep in sync with THREAD_GROUP_* in frameworks/base/core/java/android/os/Process.java */
typedef enum {
    SP_DEFAULT = -1,
+0 −46
Original line number Diff line number Diff line
@@ -19,11 +19,6 @@ package {
prebuilt_etc {
    name: "cgroups.json",
    src: "cgroups.json",
    required: [
        "cgroups_28.json",
        "cgroups_29.json",
        "cgroups_30.json",
    ],
}

prebuilt_etc {
@@ -33,50 +28,9 @@ prebuilt_etc {
    src: "cgroups.recovery.json",
}

prebuilt_etc {
    name: "cgroups_28.json",
    src: "cgroups_28.json",
    sub_dir: "task_profiles",
}

prebuilt_etc {
    name: "cgroups_29.json",
    src: "cgroups_29.json",
    sub_dir: "task_profiles",
}

prebuilt_etc {
    name: "cgroups_30.json",
    src: "cgroups_30.json",
    sub_dir: "task_profiles",
}

prebuilt_etc {
    name: "task_profiles.json",
    src: "task_profiles.json",
    required: [
        "task_profiles_28.json",
        "task_profiles_29.json",
        "task_profiles_30.json",
    ],
}

prebuilt_etc {
    name: "task_profiles_28.json",
    src: "task_profiles_28.json",
    sub_dir: "task_profiles",
}

prebuilt_etc {
    name: "task_profiles_29.json",
    src: "task_profiles_29.json",
    sub_dir: "task_profiles",
}

prebuilt_etc {
    name: "task_profiles_30.json",
    src: "task_profiles_30.json",
    sub_dir: "task_profiles",
}

cc_defaults {
+0 −11
Original line number Diff line number Diff line
{
  "Cgroups": [
    {
      "Controller": "schedtune",
      "Path": "/dev/stune",
      "Mode": "0755",
      "UID": "system",
      "GID": "system"
    }
  ]
}
+0 −11
Original line number Diff line number Diff line
{
  "Cgroups": [
    {
      "Controller": "schedtune",
      "Path": "/dev/stune",
      "Mode": "0755",
      "UID": "system",
      "GID": "system"
    }
  ]
}
Loading