Commit 4425c3e
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 f53b32f7290958fe1e4f03a300c8e1f860e8b3f3)1 parent 2812715 commit 4425c3e
3 files changed
+7
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
422 | 422 | | |
423 | 423 | | |
424 | 424 | | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
425 | 429 | | |
426 | 430 | | |
427 | 431 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3861 | 3861 | | |
3862 | 3862 | | |
3863 | 3863 | | |
| 3864 | + | |
| 3865 | + | |
3864 | 3866 | | |
3865 | 3867 | | |
3866 | 3868 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
| 114 | + | |
114 | 115 | | |
115 | 116 | | |
116 | 117 | | |
| |||
0 commit comments