Commit f53b32f7 authored by Tengfei Fan's avatar Tengfei Fan Committed by Todd Kjos
Browse files

ANDROID: sched/scx: Add vendor hook to update task's data when switching to scx



Vendor might want to change task's data when they are moved from other
sched_class to scx sched_class. Add vendor hook to give control to
vendor to implement what they need.
The vendor may have its own scheduling algorithm that can coexist
with SCX and manages all other scheduler sched_class (except the
SCX sched_class).
When SCX is enabled, some tasks(such as all fair tasks) are migrated
from other sched_class (managed by the vendor's algorithm) to the SCX
sched_class. During this migration, it's necessary to reset the vendor
scheduler's historical data for these tasks. Otherwise, inconsistencies
in the data may cause a panic. This is because, depending on the
scenario, some tasks may frequently switch between the SCX sched_class
and other sched_class (such as the RT sched_class). If a task switches
back from the SCX sched_class to another sched_class while still
retaining outdated data from the vendor scheduler, the
desynchronization may trigger a panic.

Bug: 436479714
Change-Id: Ib148c7a3bfc9a8af6ec76d14f3936850033564e1
Signed-off-by: default avatarTengfei Fan <quic_tengfan@quicinc.com>
Signed-off-by: default avatarSrinivasarao Pathipati <quic_c_spathi@quicinc.com>
parent 1871faf4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment