Don't lower priority of EGL Init thread
The EGL Init thread spends a lot of time loading shared libraries, which involves reading pages and adjusting VM pages. Previously it was a low priority thread, which meant that when it blocked while holding a VM lock, it might take a while to be scheduled again once ready, so it would hold the VM lock longer than necessary, blocking other threads waiting on soft faults, etc. Classic priority inversion. Leaving the thread at normal priority causes it to interfere *less* with critical-path Activity launch work. Bug: 34611670 Test: go/platform-startup, specifically: ./tradefed.sh run google/template/local --template:map test google/test/performance/app-launch-perf --post-boot-command "service call persistent_data_block 6 i32 1" --post-boot-command "service call persistent_data_block 7 i32 1" --apps Clock alarmclock --trial-launch --launch-iteration 10 --launch-order cyclic --drop-cache --trace-directory sdcard --trace-iteration 2 --simple-perf-cmd "simpleperf stat -a" --report-metrics all --force-skip-system-props --alt-dir `pwd` Change-Id: I17647c657da64d15f40f8f2b97ee3400e1f0be7f
Loading
Please register or sign in to comment