Revert "ARM64: sched: fix bug: avoid infinite loop"
authorHuang, Tao <huangtao@rock-chips.com>
Fri, 4 Nov 2016 06:06:58 +0000 (14:06 +0800)
committerHuang, Tao <huangtao@rock-chips.com>
Fri, 4 Nov 2016 06:12:09 +0000 (14:12 +0800)
This reverts commit d4773e1407b6d59a202bd4ce8acc83deaceafa29.

Fixed by commit abdb60d816bfd20b8d4f61c3e7c95a61ad12212a
("FIXUP: sched/fair: Fix hang during suspend in sched_group_energy")

Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
kernel/sched/fair.c

index c51be77f93930c5558d9d50237cdb78f2540b0c6..3217494e326efd6c19305f593bc0606b8a640ae8 100644 (file)
@@ -4883,7 +4883,6 @@ static int sched_group_energy(struct energy_env *eenv)
                struct sched_group *sg_shared_cap = NULL;
 
                cpu = cpumask_first(&visit_cpus);
                struct sched_group *sg_shared_cap = NULL;
 
                cpu = cpumask_first(&visit_cpus);
-               cpumask_clear_cpu(cpu, &visit_cpus);
 
                /*
                 * Is the group utilization affected by cpus outside this
 
                /*
                 * Is the group utilization affected by cpus outside this
@@ -4946,12 +4945,8 @@ static int sched_group_energy(struct energy_env *eenv)
 
                                total_energy += sg_busy_energy + sg_idle_energy;
 
 
                                total_energy += sg_busy_energy + sg_idle_energy;
 
-                               if (!sd->child) {
-                                       int i;
-
-                                       for_each_cpu(i, sched_group_cpus(sg))
-                                               cpumask_clear_cpu(i, &visit_cpus);
-                               }
+                               if (!sd->child)
+                                       cpumask_xor(&visit_cpus, &visit_cpus, sched_group_cpus(sg));
 
                                if (cpumask_equal(sched_group_cpus(sg), sched_group_cpus(eenv->sg_top)))
                                        goto next_cpu;
 
                                if (cpumask_equal(sched_group_cpus(sg), sched_group_cpus(eenv->sg_top)))
                                        goto next_cpu;