Re: [PATCH v5 1/9] sched: Extend scheduler's asym packing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 1 October 2016 at 06:45, Srinivas Pandruvada
<srinivas.pandruvada@xxxxxxxxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux