Commit e862f113 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



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
Bug: 448317641
Fixes: 4f417c9c ("ANDROID: vendor_hooks: Add hooks for oem futex optimization")
Change-Id: Id2e2d28603509c2cadc3511e16e24c96c98c5b75
Signed-off-by: default avatarFuchun Liao <lfc@oppo.com>
(cherry picked from commit 740d42d1)
parent c9584d7f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment