>> +/*
>> + * Try to collect the task running number and capacity of the doamin.
>> + */
>> +static void get_sd_power_stats(struct sched_domain *sd,
>> +            struct task_struct *p, struct sd_lb_stats *sds)
>> +{
>> +    struct sched_group *group;
>> +    struct sg_lb_stats sgs;
>> +    int sd_min_delta = INT_MAX;
>> +    int cpu = task_cpu(p);
>> +
>> +    group = sd->groups;
>> +    do {
>> +            long g_delta;
>> +            unsigned long threshold;
>> +
>> +            if (!cpumask_test_cpu(cpu, sched_group_mask(group)))
>> +                    continue;
> 
> Why?
> 
> That means only local group's stat will be accounted for this domain,
> right?  Is it your intension?
> 

Uh, Thanks a lot for finding this bug!
it is a mistake, should be:
+               if (!cpumask_intersects(sched_group_cpus(group),
+                                       tsk_cpus_allowed(p)))
+                       continue;

-- 
Thanks Alex
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to