Messages in this thread | | | Date | Mon, 14 Jan 2013 16:30:26 +0800 | From | Alex Shi <> | Subject | Re: [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
| |