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 <migueldedios@google.com>
Signed-off-by: Alexander Winkowski <dereference23@outlook.com>
fourteen
Miguel de Dios 6 years ago committed by Jenna
parent f12e4ae122
commit 58d4d01d6c
  1. 5
      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; p->on_rq = TASK_ON_RQ_MIGRATING;
dequeue_task(rq, p, DEQUEUE_NOCLOCK); dequeue_task(rq, p, DEQUEUE_NOCLOCK);
#ifdef CONFIG_SCHED_WALT
double_lock_balance(rq, cpu_rq(new_cpu)); double_lock_balance(rq, cpu_rq(new_cpu));
set_task_cpu(p, new_cpu); set_task_cpu(p, new_cpu);
double_rq_unlock(cpu_rq(new_cpu), rq); 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); rq = cpu_rq(new_cpu);

Loading…
Cancel
Save