lkml.org 
[lkml]   [2013]   [Jan]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 16/22] sched: add power aware scheduling in fork/exec/wake

>> +/*
>> + * 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


\
 
 \ /
  Last update: 2013-01-14 10:01    [W:0.158 / U:0.496 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site