Commit 869fc79d authored by zhujingpeng's avatar zhujingpeng
Browse files

ANDROID: vendor_hooks: add hooks in rwsem



these hooks are required by the following features:
1.For rwsem readers, currently only the latest reader will be
recorded in sem->owner. We add hooks to record all readers which
have acquired the lock, once there are UX threads blocked in the
rwsem waiting list, these read_owners will be given high
priority in scheduling.
2.For rwsem writer, when a writer acquires the lock, we check
whether there are UX threads blocked in the rwsem wait list. If
so, we give this writer a high priority in scheduling so that it
can release the lock as soon as possible.

Both of these features can optimize the priority inversion
problem caused by rwsem and improve system responsiveness and
performance.

Bug: 335408185
Change-Id: I82a6fbb6acd2ce05d049e686b61e34e4d3b39a5e
Signed-off-by: default avatarzhujingpeng <zhujingpeng@vivo.com>
[jstultz: Rebased and resolved minor conflict]
Signed-off-by: default avatarJohn Stultz <jstultz@google.com>
(cherry picked from commit 188c4174)
parent db3398da
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment