mirror of
https://github.com/torvalds/linux.git
synced 2026-07-31 03:27:03 +02:00
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:
parent
f41f3a4e0c
commit
84bb530ed3
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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)) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user