ANDROID: sched: add hook point in do_sched_yield()
When a task yields, it relinquishes the cpu and scheduler is tasked to find another task. However our vendor scheduler logic implementation could return the same task leading to a loop where the yielded task gets to run back, so add hook point in do_sched_yield() for vendor can do some work before task is scheduled. Bug: 205804537 Change-Id: I6528c3f4b0ee360559ef9c97cb1eb2b2d1357870 Signed-off-by: Tengfei Fan <quic_tengfan@quicinc.com>
This commit is contained in:
@@ -291,6 +291,10 @@ DECLARE_RESTRICTED_HOOK(android_rvh_replace_next_task_fair,
|
||||
bool simple, struct task_struct *prev),
|
||||
TP_ARGS(rq, p, se, repick, simple, prev), 1);
|
||||
|
||||
DECLARE_RESTRICTED_HOOK(android_rvh_do_sched_yield,
|
||||
TP_PROTO(struct rq *rq),
|
||||
TP_ARGS(rq), 1);
|
||||
|
||||
DECLARE_RESTRICTED_HOOK(android_rvh_util_est_update,
|
||||
TP_PROTO(struct cfs_rq *cfs_rq, struct task_struct *p, bool task_sleep, int *ret),
|
||||
TP_ARGS(cfs_rq, p, task_sleep, ret), 1);
|
||||
|
Reference in New Issue
Block a user