summaryrefslogtreecommitdiff
path: root/rs/java/android/renderscript/ProgramStore.java
diff options
context:
space:
mode:
authorRiddle Hsu <riddlehsu@google.com>2019-01-30 13:04:50 +0800
committerRiddle Hsu <riddlehsu@google.com>2019-01-30 17:32:44 +0800
commitd7088f8f76795808c530bed61926457db33bf7a0 (patch)
tree1fa57e1f05f0dd5b2309be73a247a81bc6582e42 /rs/java/android/renderscript/ProgramStore.java
parent195bafa15118d3a9ff666042e83147e77486134d (diff)
Update uid process state synchronously
ActivityTaskManagerService has a mirror ActiveUids. Originally it may be updated to an intermediate state (e.g. UidRecord.reset) and the uid state can be accessed before the actual value is set. That leads to unexpected behavior depends on timing. Now the mirror ActiveUids will only be updated when the actual uid state is decided during updating oom-adj. And by acquiring window manager's lock when updating oom-adj, it also synchronizes other states with activity task manager. Although an additional lock is held, it is possible to have benefit that reduces the frequency of lock and unlock. Also optimize the usage of priority booster by having an alias lock with different type declaration, then the overhead of unnecessary nested boost injections can be eliminated. Bug: 123502026 Test: atest ActivityManagerServiceTest Test: Manual measure until the last boot complete receiver is done: - Invocation of nested priority boost Reduce ~10000 times (50%, total 0.3s) boost invocation - Invocation of updateOomAdjLocked ~170 times total reduces ~0.05s (only compare between with and without global lock) Change-Id: I160f951e103835401ccaaf7c732ba407e011c39b
Diffstat (limited to 'rs/java/android/renderscript/ProgramStore.java')
0 files changed, 0 insertions, 0 deletions