|
@@ -7996,7 +7996,7 @@ static int active_load_balance_cpu_stop(void *data);
|
|
|
static int should_we_balance(struct lb_env *env)
|
|
|
{
|
|
|
struct sched_group *sg = env->sd->groups;
|
|
|
- struct cpumask *sg_cpus, *sg_mask;
|
|
|
+ struct cpumask *sg_mask;
|
|
|
int cpu, balance_cpu = -1;
|
|
|
|
|
|
/*
|
|
@@ -8006,11 +8006,10 @@ static int should_we_balance(struct lb_env *env)
|
|
|
if (env->idle == CPU_NEWLY_IDLE)
|
|
|
return 1;
|
|
|
|
|
|
- sg_cpus = sched_group_cpus(sg);
|
|
|
sg_mask = sched_group_mask(sg);
|
|
|
/* Try to find first idle cpu */
|
|
|
- for_each_cpu_and(cpu, sg_cpus, env->cpus) {
|
|
|
- if (!cpumask_test_cpu(cpu, sg_mask) || !idle_cpu(cpu))
|
|
|
+ for_each_cpu_and(cpu, sg_mask, env->cpus) {
|
|
|
+ if (!idle_cpu(cpu))
|
|
|
continue;
|
|
|
|
|
|
balance_cpu = cpu;
|