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

Commit b2eb4311 authored by Andres Oportus's avatar Andres Oportus Committed by Dmitry Shmidt
Browse files

ANDROID: sched/walt: Fix missing locking in WALT port



commit 26c21548 ("ANDROID: sched: Introduce Window Assisted Load
Tracking (WALT)") which was a forward port of WALT from android 4.4
missed locking for 2 set_task_cpu() calls, re-added here.

Signed-off-by: default avatarAndres Oportus <andresoportus@google.com>
parent d32793b6
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1011,7 +1011,9 @@ static struct rq *move_queued_task(struct rq *rq, struct task_struct *p, int new

	p->on_rq = TASK_ON_RQ_MIGRATING;
	dequeue_task(rq, p, 0);
	double_lock_balance(rq, cpu_rq(new_cpu));
	set_task_cpu(p, new_cpu);
	double_unlock_balance(rq, cpu_rq(new_cpu));
	raw_spin_unlock(&rq->lock);

	rq = cpu_rq(new_cpu);
+2 −0
Original line number Diff line number Diff line
@@ -7367,7 +7367,9 @@ 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, 0);
	double_lock_balance(env->src_rq, env->dst_rq);
	set_task_cpu(p, env->dst_cpu);
	double_unlock_balance(env->src_rq, env->dst_rq);
}

/*