summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/sched/fair.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 9d046d58050b..6e7ba8bce1fb 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -9553,7 +9553,7 @@ no_move:
stop_one_cpu_nowait(cpu_of(busiest),
active_load_balance_cpu_stop, busiest,
&busiest->active_balance_work);
- ld_moved++;
+ *continue_balancing = 0;
}
/*
@@ -9761,9 +9761,12 @@ static int idle_balance(struct rq *this_rq)
/*
* Stop searching for tasks to pull if there are
- * now runnable tasks on the balance rq.
+ * now runnable tasks on the balance rq or if
+ * continue_balancing has been unset (only possible
+ * due to active migration).
*/
- if (pulled_task || balance_rq->nr_running > 0)
+ if (pulled_task || balance_rq->nr_running > 0 ||
+ !continue_balancing)
break;
}
rcu_read_unlock();