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

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

Merge "sched/core: Fix migrate tasks bail-out condition"

parents 2401d64a 45b8775b
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -5497,7 +5497,7 @@ static void migrate_tasks(struct rq *dead_rq, bool migrate_pinned_tasks)
		 */
		if ((migrate_pinned_tasks && rq->nr_running == 1) ||
		   (!migrate_pinned_tasks &&
		    rq->nr_running == num_pinned_kthreads))
		    rq->nr_running <= num_pinned_kthreads))
			break;

		/*
@@ -5533,8 +5533,12 @@ static void migrate_tasks(struct rq *dead_rq, bool migrate_pinned_tasks)
		 * Since we're inside stop-machine, _nothing_ should have
		 * changed the task, WARN if weird stuff happened, because in
		 * that case the above rq->lock drop is a fail too.
		 * However, during cpu isolation the load balancer might have
		 * interferred since we don't stop all CPUs. Ignore warning for
		 * this case.
		 */
		if (WARN_ON(task_rq(next) != rq || !task_on_rq_queued(next))) {
		if (WARN_ON((task_rq(next) != rq || !task_on_rq_queued(next)) &&
			     migrate_pinned_tasks)) {
			raw_spin_unlock(&next->pi_lock);
			continue;
		}