sched/walt: Add walt_disabled checks

Entry into WALT code via tracehooks should be guarded based on the
completion of WALT initialization.
Add check for the same in functions where it is missing.

Change-Id: I2a04003977832087be681108c15bd6bbb24fc7e8
Signed-off-by: Sai Harshini Nimmala <quic_snimmala@quicinc.com>
This commit is contained in:
Sai Harshini Nimmala 2022-06-15 19:08:19 -07:00 committed by Rishabh Bhatnagar
parent f41f3a4e0c
commit 84bb530ed3
2 changed files with 6 additions and 0 deletions

View File

@ -4530,6 +4530,9 @@ static void walt_do_sched_yield(void *unused, struct rq *rq)
struct task_struct *curr = rq->curr;
struct walt_task_struct *wts = (struct walt_task_struct *) curr->android_vendor_data1;
if (unlikely(walt_disabled))
return;
lockdep_assert_held(&rq->__lock);
if (!list_empty(&wts->mvp_list) && wts->mvp_list.next)
walt_cfs_deactivate_mvp_task(rq, curr);

View File

@ -329,6 +329,9 @@ static void walt_rt_find_lowest_rq(void *unused, struct task_struct *task,
{
int packing_cpu;
if (unlikely(walt_disabled))
return;
/* create a fastpath for finding a packing cpu */
packing_cpu = walt_find_cluster_packing_cpu(task_cpu(task));
if (walt_choose_packing_cpu(packing_cpu, task)) {