|
@@ -5863,6 +5863,13 @@ static int detach_tasks(struct lb_env *env)
|
|
return 0;
|
|
return 0;
|
|
|
|
|
|
while (!list_empty(tasks)) {
|
|
while (!list_empty(tasks)) {
|
|
|
|
+ /*
|
|
|
|
+ * We don't want to steal all, otherwise we may be treated likewise,
|
|
|
|
+ * which could at worst lead to a livelock crash.
|
|
|
|
+ */
|
|
|
|
+ if (env->idle != CPU_NOT_IDLE && env->src_rq->nr_running <= 1)
|
|
|
|
+ break;
|
|
|
|
+
|
|
p = list_first_entry(tasks, struct task_struct, se.group_node);
|
|
p = list_first_entry(tasks, struct task_struct, se.group_node);
|
|
|
|
|
|
env->loop++;
|
|
env->loop++;
|