mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 03:15:31 +09:00
ANDROID: sched: Update android_rvh_check_preempt_wakeup hook
android_rvh_check_preempt_wakeup hook is in place to allow vendor modules to force the running task preemption by the waking task. Update the tracepoint to accept another input to not preempting the current running task. The hook is moved further down so that it can be updated to pass the sched_entity structure corresponding to waking and running tasks in the next patch. Bug: 184575210 Change-Id: Id4f45ba2819802636b6b86ed34c124771d0d69eb Signed-off-by: Pavankumar Kondeti <quic_pkondeti@quicinc.com> Signed-off-by: Shaleen Agrawal <shalagra@codeaurora.org>
This commit is contained in:
committed by
Todd Kjos
parent
632bb51100
commit
f7ede2b168
@@ -255,8 +255,8 @@ DECLARE_RESTRICTED_HOOK(android_rvh_pick_next_entity,
|
||||
TP_ARGS(cfs_rq, curr, se), 1);
|
||||
|
||||
DECLARE_RESTRICTED_HOOK(android_rvh_check_preempt_wakeup,
|
||||
TP_PROTO(struct rq *rq, struct task_struct *p, bool *preempt),
|
||||
TP_ARGS(rq, p, preempt), 1);
|
||||
TP_PROTO(struct rq *rq, struct task_struct *p, bool *preempt, bool *nopreempt),
|
||||
TP_ARGS(rq, p, preempt, nopreempt), 1);
|
||||
|
||||
#endif /* _TRACE_HOOK_SCHED_H */
|
||||
/* This part must be outside protection */
|
||||
|
||||
@@ -7265,9 +7265,6 @@ static void check_preempt_wakeup(struct rq *rq, struct task_struct *p, int wake_
|
||||
if (unlikely(p->policy != SCHED_NORMAL) || !sched_feat(WAKEUP_PREEMPTION))
|
||||
return;
|
||||
|
||||
trace_android_rvh_check_preempt_wakeup(rq, p, &preempt);
|
||||
if (preempt)
|
||||
goto preempt;
|
||||
find_matching_se(&se, &pse);
|
||||
BUG_ON(!pse);
|
||||
|
||||
@@ -7284,6 +7281,12 @@ static void check_preempt_wakeup(struct rq *rq, struct task_struct *p, int wake_
|
||||
return;
|
||||
|
||||
update_curr(cfs_rq_of(se));
|
||||
trace_android_rvh_check_preempt_wakeup(rq, p, &preempt, &ignore);
|
||||
if (preempt)
|
||||
goto preempt;
|
||||
if (ignore)
|
||||
return;
|
||||
|
||||
if (wakeup_preempt_entity(se, pse) == 1) {
|
||||
/*
|
||||
* Bias pick_next to pick the sched entity that is
|
||||
|
||||
Reference in New Issue
Block a user