Hi Steve,
Thanks for review.
On Tue, Dec 22, 2015 at 04:32:11PM -0800, Steve Muckle wrote:
On 12/09/2015 06:53 PM, Leo Yan wrote:
[...]
static int energy_aware_wake_cpu(struct task_struct *p, int target) { struct sched_domain *sd; struct sched_group *sg, *sg_target; int target_cpu; struct cpumask target_cpus;
sd = rcu_dereference(per_cpu(sd_ea, task_cpu(p)));
if (!sd) return target;
sg = sd->groups; sg_target = sg;
cpumask_clear(&target_cpus);
do { find_best_cpu_in_sg(&target_cpus, sg, p);
} while (sg = sg->next, sg != sd->groups);
if (cpumask_empty(&target_cpus))
I think you could just return task_cpu(p) here rather than setting the mask and continuing into find_power_efficient_cpu?
Good point. I will fix it.
I also saw your suggestion to use latest kernel to verify this patch, Dietmar also suggested me to sync with EAS RFC 5.2 in another email. This patch is very dependent on CPU's utilization to select target CPU. So I will firstly to rebase on EAS RFC 5.2 and continue profiling.
Thanks, Leo Yan
cpumask_set_cpu(task_cpu(p), &target_cpus);
target_cpu = find_power_efficient_cpu(&target_cpus, p);
return target_cpu; }
thanks, Steve