Merge changes from topic "sysbg_aosp" am: 1132977223
am: d7c942ad46
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1847154 Change-Id: Ibe71cbe11ad517dd72c8eaba95ffcdceb7e0900c
This commit is contained in:
commit
808464a9d0
4 changed files with 43 additions and 2 deletions
|
@ -39,6 +39,19 @@
|
|||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"Name": "ServicePerformance",
|
||||
"Actions": [
|
||||
{
|
||||
"Name": "JoinCgroup",
|
||||
"Params":
|
||||
{
|
||||
"Controller": "schedtune",
|
||||
"Path": "background"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"Name": "HighPerformance",
|
||||
"Actions": [
|
||||
|
|
|
@ -52,6 +52,19 @@
|
|||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"Name": "ServicePerformance",
|
||||
"Actions": [
|
||||
{
|
||||
"Name": "JoinCgroup",
|
||||
"Params":
|
||||
{
|
||||
"Controller": "schedtune",
|
||||
"Path": "background"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"Name": "MaxPerformance",
|
||||
"Actions": [
|
||||
|
|
|
@ -39,6 +39,19 @@
|
|||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"Name": "ServicePerformance",
|
||||
"Actions": [
|
||||
{
|
||||
"Name": "JoinCgroup",
|
||||
"Params":
|
||||
{
|
||||
"Controller": "schedtune",
|
||||
"Path": "background"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"Name": "HighPerformance",
|
||||
"Actions": [
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue