Commit 8923ef18 authored by Fuchun Liao's avatar Fuchun Liao Committed by Giuliano Procida
Browse files

ANDROID: vendor_hooks: Add vendor_hook in futex to fix the OEM scheduling priority bug



[Replacement commit for the original that somehow ended up empty.]

Add vendor_hook in futex to fix the bug where OEM passes scheduling
priority to the futex owner but fails to restore it.

1) OEM vendors pass the priority to the futex owner in
trace_android_vh_futex_wait_start() and are supposed to restore it in
trace_android_vh_futex_wait_end(). However, due to the missing
trace_android_vh_futex_wait_end hook, the priority cannot be restored.

2) In kernel 6.6/6.1, futex_wait() uses goto out, so only one
trace_android_vh_futex_wait_end() is required. In kernel 6.12, there
are two return statements in the middle of futex_wait(), so
trace_android_vh_futex_wait_end hooks must also be added at these
return positions.

Bug: 429315946
Fixes: 4f417c9c ("ANDROID: vendor_hooks: Add hooks for oem futex optimization")
Change-Id: I7607d03bfa2f7c9a1945ef5395f9e4a42df7173c
Signed-off-by: default avatarFuchun Liao <lfc@oppo.com>
Bug: 448317641
Fixes: e862f113 ("ANDROID: vendor_hooks: Add vendor_hook in futex to fix the OEM scheduling priority bug")
Signed-off-by: default avatarGiuliano Procida <gprocida@google.com>
parent 1e164275
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment