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

Commit 3adc3bf7 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "sched: Fix possibility of "stuck" reserved flag"

parents 13a45b36 7b76c244
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -6723,14 +6723,12 @@ static int active_load_balance_cpu_stop(void *data)
	double_lock_balance(busiest_rq, target_rq);

	push_task = busiest_rq->push_task;
	target_cpu = busiest_rq->push_cpu;
	if (push_task) {
		if (push_task->on_rq && push_task->state == TASK_RUNNING &&
		    task_cpu(push_task) == busiest_cpu &&
		    cpu_online(target_cpu))
			move_task(push_task, &env);
		put_task_struct(push_task);
		clear_reserved(target_cpu);
		busiest_rq->push_task = NULL;
		goto out_unlock_balance;
	}

@@ -6756,6 +6754,13 @@ out_unlock_balance:
	double_unlock_balance(busiest_rq, target_rq);
out_unlock:
	busiest_rq->active_balance = 0;
	push_task = busiest_rq->push_task;
	target_cpu = busiest_rq->push_cpu;
	if (push_task) {
		put_task_struct(push_task);
		clear_reserved(target_cpu);
		busiest_rq->push_task = NULL;
	}
	raw_spin_unlock_irq(&busiest_rq->lock);
	if (per_cpu(dbs_boost_needed, target_cpu)) {
		struct migration_notify_data mnd;