Skip to content

Commit ef31728

Browse files
author
Android Build Coastguard Worker
committed
Snap for 7808903 from ecaf9ef to sc-qpr1-d-release
Change-Id: I2ef0b303a9d1e9ad5e12ae63b88504b2beb5495c
2 parents ed88b74 + ecaf9ef commit ef31728

5 files changed

Lines changed: 44 additions & 16 deletions

File tree

libprocessgroup/profiles/task_profiles_28.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,19 @@
3939
}
4040
]
4141
},
42+
{
43+
"Name": "ServicePerformance",
44+
"Actions": [
45+
{
46+
"Name": "JoinCgroup",
47+
"Params":
48+
{
49+
"Controller": "schedtune",
50+
"Path": "background"
51+
}
52+
}
53+
]
54+
},
4255
{
4356
"Name": "HighPerformance",
4457
"Actions": [

libprocessgroup/profiles/task_profiles_29.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,19 @@
5252
}
5353
]
5454
},
55+
{
56+
"Name": "ServicePerformance",
57+
"Actions": [
58+
{
59+
"Name": "JoinCgroup",
60+
"Params":
61+
{
62+
"Controller": "schedtune",
63+
"Path": "background"
64+
}
65+
}
66+
]
67+
},
5568
{
5669
"Name": "MaxPerformance",
5770
"Actions": [

libprocessgroup/profiles/task_profiles_30.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,19 @@
3939
}
4040
]
4141
},
42+
{
43+
"Name": "ServicePerformance",
44+
"Actions": [
45+
{
46+
"Name": "JoinCgroup",
47+
"Params":
48+
{
49+
"Controller": "schedtune",
50+
"Path": "background"
51+
}
52+
}
53+
]
54+
},
4255
{
4356
"Name": "HighPerformance",
4457
"Actions": [

libutils/Threads.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,10 @@ struct thread_data_t {
8686

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

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

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

rootdir/init.rc

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -590,20 +590,7 @@ on late-fs
590590
# Load trusted keys from dm-verity protected partitions
591591
exec -- /system/bin/fsverity_init --load-verified-keys
592592

593-
# Only enable the bootreceiver tracing instance for kernels 5.10 and above.
594-
on late-fs && property:ro.kernel.version=4.9
595-
setprop bootreceiver.enable 0
596-
on late-fs && property:ro.kernel.version=4.14
597-
setprop bootreceiver.enable 0
598-
on late-fs && property:ro.kernel.version=4.19
599-
setprop bootreceiver.enable 0
600-
on late-fs && property:ro.kernel.version=5.4
601-
setprop bootreceiver.enable 0
602-
on late-fs
603-
# Bootreceiver tracing instance is enabled by default.
604-
setprop bootreceiver.enable ${bootreceiver.enable:-1}
605-
606-
on property:ro.product.cpu.abilist64=* && property:bootreceiver.enable=1
593+
on late-fs && property:ro.product.cpu.abilist64=*
607594
# Set up a tracing instance for system_server to monitor error_report_end events.
608595
# These are sent by kernel tools like KASAN and KFENCE when a memory corruption
609596
# is detected. This is only needed for 64-bit systems.

0 commit comments

Comments
 (0)