From 58d4d01d6c6e9ac5d724da75595f35b584e1a757 Mon Sep 17 00:00:00 2001 From: Miguel de Dios Date: Thu, 7 Feb 2019 17:58:55 -0800 Subject: [PATCH] sched: core: Disable double lock/unlock balance in move_queued_task() CONFIG_LOCK_STAT shows warnings in move_queued_task() for releasing a pinned lock. The warnings are due to the calls to double_unlock_balance() added to snapshot WALT. Lets disable them if not building with SCHED_WALT. Bug: 123720375 Change-Id: I8bff8550c4f79ca535556f6ec626f17ff5fce637 Signed-off-by: Miguel de Dios Signed-off-by: Alexander Winkowski --- kernel/sched/core.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index e9073ce185a6..69804e135509 100755 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -987,9 +987,14 @@ static struct rq *move_queued_task(struct rq *rq, struct rq_flags *rf, p->on_rq = TASK_ON_RQ_MIGRATING; dequeue_task(rq, p, DEQUEUE_NOCLOCK); +#ifdef CONFIG_SCHED_WALT double_lock_balance(rq, cpu_rq(new_cpu)); set_task_cpu(p, new_cpu); double_rq_unlock(cpu_rq(new_cpu), rq); +#else + set_task_cpu(p, new_cpu); + rq_unlock(rq, rf); +#endif rq = cpu_rq(new_cpu);