[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <50F3C222.6050002@intel.com>
Date: Mon, 14 Jan 2013 16:30:26 +0800
From: Alex Shi <alex.shi@...el.com>
To: Namhyung Kim <namhyung@...nel.org>
CC: mingo@...hat.com, peterz@...radead.org, tglx@...utronix.de,
akpm@...ux-foundation.org, arjan@...ux.intel.com, bp@...en8.de,
pjt@...gle.com, efault@....de, vincent.guittot@...aro.org,
gregkh@...uxfoundation.org, preeti@...ux.vnet.ibm.com,
linux-kernel@...r.kernel.org
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists