diff options
author | Srivatsa Vaddagiri <vatsa@codeaurora.org> | 2014-07-27 23:39:24 -0700 |
---|---|---|
committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-23 20:00:06 -0700 |
commit | 35bf2d9d10710770c8f7d070b64381f8dde54e80 (patch) | |
tree | 39264d7a4b3f767160a4c7678bfd900ee40c3c20 | |
parent | 1f6363e54c1080d6c343478af84c05d45a7c443f (diff) |
sched: Drop active balance request upon cpu going offline
A cpu could mark its currently running task to be migrated to another
cpu (via rq->push_task/rq->push_cpu) and could go offline before
active load balance handles the request. In such case, clear the
active load balance request.
Change-Id: Ia3e668e34edbeb91d8559c1abb4cbffa25b1830b
Signed-off-by: Srivatsa Vaddagiri <vatsa@codeaurora.org>
-rw-r--r-- | kernel/sched/core.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 6c09685de191..a2d75c9a6321 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -1129,7 +1129,19 @@ void boost_kick(int cpu) /* Clear any HMP scheduler related requests pending from or on cpu */ static inline void clear_hmp_request(int cpu) { + struct rq *rq = cpu_rq(cpu); + unsigned long flags; + clear_boost_kick(cpu); + if (rq->push_task) { + raw_spin_lock_irqsave(&rq->lock, flags); + if (rq->push_task) { + put_task_struct(rq->push_task); + rq->push_task = NULL; + } + rq->active_balance = 0; + raw_spin_unlock_irqrestore(&rq->lock, flags); + } } #else |