mirror of
https://github.com/torvalds/linux.git
synced 2026-07-31 11:37:06 +02:00
sched/walt: Adjust code as per new dequeue_task() hook invocation
dequeue_task() hook invocation is being changed from post dequeue to pre dequeue. Consider the task being dequeued is out of the scheduling class managed list. Change-Id: Ib95ec7f8a873587493487a3c31c3f53ea78b0d95 Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
This commit is contained in:
parent
a1ccf98f6f
commit
c12499d938
|
|
@ -419,7 +419,7 @@ static inline bool is_ed_task(struct task_struct *p, u64 wallclock)
|
|||
return (wallclock - wts->last_wake_ts >= EARLY_DETECTION_DURATION);
|
||||
}
|
||||
|
||||
static bool is_ed_task_present(struct rq *rq, u64 wallclock)
|
||||
static bool is_ed_task_present(struct rq *rq, u64 wallclock, struct task_struct *deq_task)
|
||||
{
|
||||
struct task_struct *p;
|
||||
int loop_max = 10;
|
||||
|
|
@ -434,6 +434,9 @@ static bool is_ed_task_present(struct rq *rq, u64 wallclock)
|
|||
if (!loop_max)
|
||||
break;
|
||||
|
||||
if (p == deq_task)
|
||||
continue;
|
||||
|
||||
if (is_ed_task(p, wallclock)) {
|
||||
wrq->ed_task = p;
|
||||
return true;
|
||||
|
|
@ -3758,7 +3761,7 @@ static void android_rvh_dequeue_task(void *unused, struct rq *rq, struct task_st
|
|||
if (unlikely(walt_disabled))
|
||||
return;
|
||||
if (p == wrq->ed_task)
|
||||
is_ed_task_present(rq, sched_ktime_clock());
|
||||
is_ed_task_present(rq, sched_ktime_clock(), p);
|
||||
|
||||
sched_update_nr_prod(rq->cpu, false);
|
||||
|
||||
|
|
@ -3866,7 +3869,7 @@ static void android_rvh_tick_entry(void *unused, struct rq *rq)
|
|||
set_preferred_cluster(grp);
|
||||
rcu_read_unlock();
|
||||
|
||||
if (is_ed_task_present(rq, wallclock))
|
||||
if (is_ed_task_present(rq, wallclock, NULL))
|
||||
waltgov_run_callback(rq, WALT_CPUFREQ_EARLY_DET);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user