lkml.org 
[lkml]   [2016]   [Oct]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v5 1/9] sched: Extend scheduler's asym packing
On 1 October 2016 at 06:45, Srinivas Pandruvada
<srinivas.pandruvada@linux.intel.com> wrote:
> diff --git a/kernel/sched/core.c b/kernel/sched/core.c
> index e86c4a5..08135ca 100644
> --- a/kernel/sched/core.c
> +++ b/kernel/sched/core.c
> @@ -6237,7 +6237,25 @@ static void init_sched_groups_capacity(int cpu, struct sched_domain *sd)
> WARN_ON(!sg);
>
> do {
> + int cpu, max_cpu = -1, prev_cpu = -1;
> +
> sg->group_weight = cpumask_weight(sched_group_cpus(sg));
> +
> + if (!(sd->flags & SD_ASYM_PACKING))
> + goto next;
> +
> + for_each_cpu(cpu, sched_group_cpus(sg)) {
> + if (prev_cpu < 0) {
> + prev_cpu = cpu;
> + max_cpu = cpu;

It seems that you can drop prev_cpu and put the check on max_cpu instead.

--
Nilay

\
 
 \ /
  Last update: 2016-10-01 18:39    [W:0.153 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site