sched/walt: Check if necessary for sched_boost modify

Check if necessary to do exit and next_boost enter
oprations instead of doing it regardlessly.
Core control boost refcounts has been wrong if doing
current sched_boost exit and next_boost enter by mistake.

Change-Id: Ie40ebf0be0e1b99291d07d160ebef5964d44ba16
Signed-off-by: Maria Yu <aiquny@codeaurora.org>
This commit is contained in:
Maria Yu 2021-08-24 18:35:07 +08:00 committed by Rishabh Bhatnagar
parent 925dd42831
commit 9847c28cfd

View File

@ -184,17 +184,15 @@ static void sched_boost_disable(int type)
if (sb->refcount)
return;
next_boost = sched_effective_boost();
if (next_boost == prev_boost)
return;
/*
* This boost's refcount becomes zero, so it must
* be disabled. Disable it first and then apply
* the next boost.
*/
sb->exit();
next_boost = sched_effective_boost();
if (next_boost == prev_boost)
return;
sched_boosts[next_boost].enter();
}