ANDROID: sched: Add parameter to android_rvh_set_iowait

While overriding sugov behavior, it is also necessary to know the
runqueue on which the task is going to be enqueued.

Bug: 171598214
Change-Id: I1491a2be34a6e615c5d4bc68e095647744870233
Signed-off-by: Shaleen Agrawal <shalagra@codeaurora.org>
This commit is contained in:
Shaleen Agrawal
2021-11-09 11:55:06 -08:00
parent 81a0b58261
commit b8146375bb
2 changed files with 3 additions and 3 deletions

View File

@@ -113,8 +113,8 @@ DECLARE_HOOK(android_vh_set_sugov_sched_attr,
TP_PROTO(struct sched_attr *attr),
TP_ARGS(attr));
DECLARE_RESTRICTED_HOOK(android_rvh_set_iowait,
TP_PROTO(struct task_struct *p, int *should_iowait_boost),
TP_ARGS(p, should_iowait_boost), 1);
TP_PROTO(struct task_struct *p, struct rq *rq, int *should_iowait_boost),
TP_ARGS(p, rq, should_iowait_boost), 1);
struct sugov_policy;
DECLARE_RESTRICTED_HOOK(android_rvh_set_sugov_update,
TP_PROTO(struct sugov_policy *sg_policy, unsigned int next_freq, bool *should_update),

View File

@@ -5632,7 +5632,7 @@ enqueue_task_fair(struct rq *rq, struct task_struct *p, int flags)
* passed.
*/
should_iowait_boost = p->in_iowait;
trace_android_rvh_set_iowait(p, &should_iowait_boost);
trace_android_rvh_set_iowait(p, rq, &should_iowait_boost);
if (should_iowait_boost)
cpufreq_update_util(rq, SCHED_CPUFREQ_IOWAIT);