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
Bug: 148940637
Change-Id: I8bff8550c4f79ca535556f6ec626f17ff5fce637
Signed-off-by: Miguel de Dios <migueldedios@google.com>
Signed-off-by: Jimmy Shiu <jimmyshiu@google.com>
This commit is contained in:
Miguel de Dios 2019-02-07 17:58:55 -08:00 committed by spakkkk
parent 96c3f64cd4
commit 8399535f1b

View File

@ -1569,11 +1569,16 @@ static struct rq *move_queued_task(struct rq *rq, struct rq_flags *rf,
WRITE_ONCE(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));
if (!(rq->clock_update_flags & RQCF_UPDATED))
update_rq_clock(rq);
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);