Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 057c6ceb authored by Pavankumar Kondeti's avatar Pavankumar Kondeti Committed by Pranav Vashi
Browse files

sched: walt: Fix stale walt CPU reservation flag



When CPU trying to move a task to other cpu in active load balance or
by other means, then the other helping cpu marked as reserved to avoid
 it for other scheduler decisions. Once the task moved successfully,
the reservation will be cleared enables for other scheduler decisions.
The reserved flag is been analogously protected with busy cpu’s
rq->active_balance, which is protected with runqueue locks. So whenever
rq->active_balance is set for busy cpu, then reserved flag would set for
helping cpu.

Sometimes, it is observed that, cpu is marked as reserved with no cpu's
rq->active_balance set. There are some unlikely possible corner cases
may cause this behavior:
 - On active load balance path, cpu stop machine returns queued status
   of active_balance work on cpu_stopper, which is not checked on active
   balance path. so when stop machine is not able to queue ( unlikely),
   then reserved flag wouldn't be cleared.

   So, catch the return value and on failure, clear reserved flag for cpu.

 - Clear_walt_request() called on the cpu to clear any pending walt works,
   it may possible that, push_task might have changed or cleared, then
   reserved cpu would be left uncleared.

   So clear the push_cpu independent of push_task.

Change-Id: I75d032bf399cb3da8e807186b1bc903114168a4e
Signed-off-by: default avatarPavankumar Kondeti <pkondeti@codeaurora.org>
Signed-off-by: default avatarLingutla Chandrasekhar <clingutla@codeaurora.org>
Signed-off-by: default avatarAlexander Winkowski <dereference23@outlook.com>
Signed-off-by: default avatarPranav Vashi <neobuddy89@gmail.com>
parent 8e179eb6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment