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 Bug: 438048008 Change-Id: Ib148c7a3bfc9a8af6ec76d14f3936850033564e1 Signed-off-by:Tengfei Fan <quic_tengfan@quicinc.com> Signed-off-by:
Srinivasarao Pathipati <quic_c_spathi@quicinc.com> (cherry picked from commit f53b32f7)
Loading
Please sign in to comment