diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2019-02-27 13:04:00 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2019-02-27 13:04:00 +0000 |
commit | d5345f58fdb11f9f362b00bbfd9d7b19ca659fcc (patch) | |
tree | 11c2e2524c9cc94b8088b4b6f0fa0dfcf5d90ab3 /libprocessgroup/sched_policy.cpp | |
parent | 55d36240dcb1795cf7e05310520cd4005663d554 (diff) | |
parent | 2b3bf84373665e10d96c6b1680e5e53039505325 (diff) |
Merge "Add blkio cgroup to libprocessgroup"
Diffstat (limited to 'libprocessgroup/sched_policy.cpp')
-rw-r--r-- | libprocessgroup/sched_policy.cpp | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/libprocessgroup/sched_policy.cpp b/libprocessgroup/sched_policy.cpp index 337b032f2..026c01138 100644 --- a/libprocessgroup/sched_policy.cpp +++ b/libprocessgroup/sched_policy.cpp @@ -46,20 +46,20 @@ int set_cpuset_policy(int tid, SchedPolicy policy) { switch (policy) { case SP_BACKGROUND: - return SetTaskProfiles(tid, - {"HighEnergySaving", "ProcessCapacityLow", "TimerSlackHigh"}) + return SetTaskProfiles(tid, {"HighEnergySaving", "ProcessCapacityLow", "LowIoPriority", + "TimerSlackHigh"}) ? 0 : -1; case SP_FOREGROUND: case SP_AUDIO_APP: case SP_AUDIO_SYS: - return SetTaskProfiles(tid, - {"HighPerformance", "ProcessCapacityHigh", "TimerSlackNormal"}) + return SetTaskProfiles(tid, {"HighPerformance", "ProcessCapacityHigh", "HighIoPriority", + "TimerSlackNormal"}) ? 0 : -1; case SP_TOP_APP: - return SetTaskProfiles(tid, - {"MaxPerformance", "ProcessCapacityMax", "TimerSlackNormal"}) + return SetTaskProfiles(tid, {"MaxPerformance", "ProcessCapacityMax", "MaxIoPriority", + "TimerSlackNormal"}) ? 0 : -1; case SP_SYSTEM: @@ -126,15 +126,24 @@ int set_sched_policy(int tid, SchedPolicy policy) { switch (policy) { case SP_BACKGROUND: - return SetTaskProfiles(tid, {"HighEnergySaving", "TimerSlackHigh"}) ? 0 : -1; + return SetTaskProfiles(tid, {"HighEnergySaving", "LowIoPriority", "TimerSlackHigh"}) + ? 0 + : -1; case SP_FOREGROUND: case SP_AUDIO_APP: case SP_AUDIO_SYS: - return SetTaskProfiles(tid, {"HighPerformance", "TimerSlackNormal"}) ? 0 : -1; + return SetTaskProfiles(tid, {"HighPerformance", "HighIoPriority", "TimerSlackNormal"}) + ? 0 + : -1; case SP_TOP_APP: - return SetTaskProfiles(tid, {"MaxPerformance", "TimerSlackNormal"}) ? 0 : -1; + return SetTaskProfiles(tid, {"MaxPerformance", "MaxIoPriority", "TimerSlackNormal"}) + ? 0 + : -1; case SP_RT_APP: - return SetTaskProfiles(tid, {"RealtimePerformance", "TimerSlackNormal"}) ? 0 : -1; + return SetTaskProfiles(tid, + {"RealtimePerformance", "MaxIoPriority", "TimerSlackNormal"}) + ? 0 + : -1; default: return SetTaskProfiles(tid, {"TimerSlackNormal"}) ? 0 : -1; } |