ANDROID: vendor_hooks: fix rt !move_entity bug while switching to sched_ext
These hooks will do the following works: when scheduling ext, the move_entity operation must be performed. Bug: 452826319 Bug: 454747318 Change-Id: I85f89607bc47dc475ddfa878b3b7f90ffd010352 Signed-off-by: Yuxing Wang <wangyuxing@oppo.com> (cherry picked from commit 6b836537975d54fdd0ed6f711ca325d2c2580bd5)
This commit is contained in:
@@ -413,6 +413,9 @@ DECLARE_RESTRICTED_HOOK(android_rvh_set_task_comm,
|
||||
TP_PROTO(struct task_struct *tsk, bool exec),
|
||||
TP_ARGS(tsk, exec), 1);
|
||||
|
||||
DECLARE_HOOK(android_vh_move_entity,
|
||||
TP_PROTO(int *move, unsigned int flags),
|
||||
TP_ARGS(move, flags));
|
||||
DECLARE_HOOK(android_vh_task_should_scx,
|
||||
TP_PROTO(int *should_scx, int policy, int prio),
|
||||
TP_ARGS(should_scx, policy, prio));
|
||||
|
||||
@@ -1250,6 +1250,10 @@ void dec_rt_tasks(struct sched_rt_entity *rt_se, struct rt_rq *rt_rq)
|
||||
*/
|
||||
static inline bool move_entity(unsigned int flags)
|
||||
{
|
||||
int move = 0;
|
||||
trace_android_vh_move_entity(&move, flags);
|
||||
if (move)
|
||||
return true;
|
||||
if ((flags & (DEQUEUE_SAVE | DEQUEUE_MOVE)) == DEQUEUE_SAVE)
|
||||
return false;
|
||||
|
||||
|
||||
@@ -106,6 +106,7 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_remove_entity_load_avg);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_set_cpus_allowed_ptr);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_update_blocked_fair);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_set_task_comm);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_move_entity);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_task_should_scx);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_scx_ops_consider_migration);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_scx_fix_prev_slice);
|
||||
|
||||
Reference in New Issue
Block a user