• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

system/core


Commit MetaInfo

Revisión6569f35ae08b5de4323ae52be47f73e4ecb58ae1 (tree)
Tiempo2019-04-17 15:23:05
AutorRick Yiu <rickyiu@goog...>
CommiterRick Yiu

Log Message

Let blkio cgroup follow cpuset cgroup only

Some app may have different cgroup settings in cpuset and schedtune for its
threads, so let blkio follow cpuset only, which represents the app's current
state more accurately. Otherwise, if that thread is doing IO, then its
performance will be affected because its blkio group is in lower priority
group as schedtune.

ex: an app is now in top-app, but some thread of it set schedtune group to
background, and blkio follows schedtune because it is called later.

Main thread:
6:schedtune:/top-app
5:memory:/
4:cpuset:/top-app
3:cpuacct:/uid_1000/pid_8766
2:cpu:/
1:blkio:/
0::/

Some thread:
6:schedtune:/background
5:memory:/
4:cpuset:/top-app
3:cpuacct:/uid_1000/pid_8766
2:cpu:/
1:blkio:/background
0::/

Bug: 124727032
Test: blkio has same settings with cpuset
Change-Id: I9a140c7d9d93e1dd43c34c8cf066f4a62e2bf604
Merged-In: I9a140c7d9d93e1dd43c34c8cf066f4a62e2bf604

Cambiar Resumen

Diferencia incremental

--- a/libprocessgroup/sched_policy.cpp
+++ b/libprocessgroup/sched_policy.cpp
@@ -126,24 +126,15 @@ int set_sched_policy(int tid, SchedPolicy policy) {
126126
127127 switch (policy) {
128128 case SP_BACKGROUND:
129- return SetTaskProfiles(tid, {"HighEnergySaving", "LowIoPriority", "TimerSlackHigh"})
130- ? 0
131- : -1;
129+ return SetTaskProfiles(tid, {"HighEnergySaving", "TimerSlackHigh"}) ? 0 : -1;
132130 case SP_FOREGROUND:
133131 case SP_AUDIO_APP:
134132 case SP_AUDIO_SYS:
135- return SetTaskProfiles(tid, {"HighPerformance", "HighIoPriority", "TimerSlackNormal"})
136- ? 0
137- : -1;
133+ return SetTaskProfiles(tid, {"HighPerformance", "TimerSlackNormal"}) ? 0 : -1;
138134 case SP_TOP_APP:
139- return SetTaskProfiles(tid, {"MaxPerformance", "MaxIoPriority", "TimerSlackNormal"})
140- ? 0
141- : -1;
135+ return SetTaskProfiles(tid, {"MaxPerformance", "TimerSlackNormal"}) ? 0 : -1;
142136 case SP_RT_APP:
143- return SetTaskProfiles(tid,
144- {"RealtimePerformance", "MaxIoPriority", "TimerSlackNormal"})
145- ? 0
146- : -1;
137+ return SetTaskProfiles(tid, {"RealtimePerformance", "TimerSlackNormal"}) ? 0 : -1;
147138 default:
148139 return SetTaskProfiles(tid, {"TimerSlackNormal"}) ? 0 : -1;
149140 }