lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 1 Oct 2016 11:38:04 -0500
From:   Nilay Vaish <nilayvaish@...il.com>
To:     Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>
Cc:     rjw@...ysocki.net, tglx@...utronix.de, mingo@...hat.com,
        bp@...e.de, x86 <x86@...nel.org>, linux-pm@...r.kernel.org,
        Linux Kernel list <linux-kernel@...r.kernel.org>,
        linux-acpi@...r.kernel.org, peterz@...radead.org,
        tim.c.chen@...ux.intel.com, jolsa@...hat.com
Subject: Re: [PATCH v5 1/9] sched: Extend scheduler's asym packing

On 1 October 2016 at 06:45, Srinivas Pandruvada
<srinivas.pandruvada@...ux.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ