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

Commit 84e53c09 authored by Miguel de Dios's avatar Miguel de Dios Committed by DarkJoker360
Browse files

sched: fair: Disable double lock/unlock balance in detach_task()



CONFIG_LOCK_STAT shows warnings in detach_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: Ibfa28b1434fa6006fa0117fd2df1a3eadb321568
Signed-off-by: default avatarMiguel de Dios <migueldedios@google.com>
Signed-off-by: default avatarAlexander Winkowski <dereference23@outlook.com>
parent 78bab039
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -9243,11 +9243,15 @@ static void detach_task(struct task_struct *p, struct lb_env *env)
	p->on_rq = TASK_ON_RQ_MIGRATING;
	deactivate_task(env->src_rq, p, DEQUEUE_NOCLOCK);
	lockdep_off();
#ifdef CONFIG_SCHED_WALT
	double_lock_balance(env->src_rq, env->dst_rq);
	if (!(env->src_rq->clock_update_flags & RQCF_UPDATED))
		update_rq_clock(env->src_rq);
	set_task_cpu(p, env->dst_cpu);
	double_unlock_balance(env->src_rq, env->dst_rq);
#else
	set_task_cpu(p, env->dst_cpu);
#endif
	lockdep_on();
}