[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACbG30-L_U=iES=+VNGSbOTsT_q3_Nvu_XVqSh6SGdua6n+ejQ@mail.gmail.com>
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