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

Commit abc6e21b authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 7809322 from 4dc0b4e1 to sc-v2-release

Change-Id: I314852715c80f75dec03b754c7dc4c4431741d05
parents 1296136f 4dc0b4e1
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -39,6 +39,19 @@
        }
      ]
    },
    {
      "Name": "ServicePerformance",
      "Actions": [
        {
          "Name": "JoinCgroup",
          "Params":
          {
            "Controller": "schedtune",
            "Path": "background"
          }
        }
      ]
    },
    {
      "Name": "HighPerformance",
      "Actions": [
+13 −0
Original line number Diff line number Diff line
@@ -52,6 +52,19 @@
        }
      ]
    },
    {
      "Name": "ServicePerformance",
      "Actions": [
        {
          "Name": "JoinCgroup",
          "Params":
          {
            "Controller": "schedtune",
            "Path": "background"
          }
        }
      ]
    },
    {
      "Name": "MaxPerformance",
      "Actions": [
+13 −0
Original line number Diff line number Diff line
@@ -39,6 +39,19 @@
        }
      ]
    },
    {
      "Name": "ServicePerformance",
      "Actions": [
        {
          "Name": "JoinCgroup",
          "Params":
          {
            "Controller": "schedtune",
            "Path": "background"
          }
        }
      ]
    },
    {
      "Name": "HighPerformance",
      "Actions": [
+4 −2
Original line number Diff line number Diff line
@@ -86,8 +86,10 @@ struct thread_data_t {

        // A new thread will be in its parent's sched group by default,
        // so we just need to handle the background case.
        // currently set to system_background group which is different
        // from background group for app.
        if (prio >= ANDROID_PRIORITY_BACKGROUND) {
            SetTaskProfiles(0, {"SCHED_SP_BACKGROUND"}, true);
            SetTaskProfiles(0, {"SCHED_SP_SYSTEM"}, true);
        }

        if (name) {
@@ -313,7 +315,7 @@ int androidSetThreadPriority(pid_t tid, int pri)
    }

    if (pri >= ANDROID_PRIORITY_BACKGROUND) {
        rc = SetTaskProfiles(tid, {"SCHED_SP_BACKGROUND"}, true) ? 0 : -1;
        rc = SetTaskProfiles(tid, {"SCHED_SP_SYSTEM"}, true) ? 0 : -1;
    } else if (curr_pri >= ANDROID_PRIORITY_BACKGROUND) {
        SchedPolicy policy = SP_FOREGROUND;
        // Change to the sched policy group of the process.