[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 05 May 2023 15:51:35 -0700
From: Tim Chen <tim.c.chen@...ux.intel.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Ricardo Neri <ricardo.neri-calderon@...ux.intel.com>,
Juri Lelli <juri.lelli@...hat.com>,
Vincent Guittot <vincent.guittot@...aro.org>,
Ricardo Neri <ricardo.neri@...el.com>,
"Ravi V . Shankar" <ravi.v.shankar@...el.com>,
Ben Segall <bsegall@...gle.com>,
Daniel Bristot de Oliveira <bristot@...hat.com>,
Dietmar Eggemann <dietmar.eggemann@....com>,
Len Brown <len.brown@...el.com>, Mel Gorman <mgorman@...e.de>,
"Rafael J . Wysocki" <rafael.j.wysocki@...el.com>,
Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>,
Steven Rostedt <rostedt@...dmis.org>,
Valentin Schneider <vschneid@...hat.com>,
Ionela Voinescu <ionela.voinescu@....com>, x86@...nel.org,
linux-kernel@...r.kernel.org,
Shrikanth Hegde <sshegde@...ux.vnet.ibm.com>,
Srikar Dronamraju <srikar@...ux.vnet.ibm.com>,
naveen.n.rao@...ux.vnet.ibm.com,
Yicong Yang <yangyicong@...ilicon.com>,
Barry Song <v-songbaohua@...o.com>
Subject: Re: [PATCH 5/6] sched/fair: Consider the idle state of the whole
core for load balance
On Fri, 2023-05-05 at 15:23 +0200, Peter Zijlstra wrote:
> On Thu, May 04, 2023 at 09:09:55AM -0700, Tim Chen wrote:
>
> > @@ -10709,11 +10709,26 @@ static int should_we_balance(struct lb_env *env)
> > for_each_cpu_and(cpu, group_balance_mask(sg), env->cpus) {
> > if (!idle_cpu(cpu))
> > continue;
> > + else {
> > + /*
> > + * Don't balance to idle SMT in busy core right away when
> > + * balancing cores, but remember the first idle SMT CPU for
> > + * later consideration. Find CPU on an idle core first.
> > + */
> > + if (!(env->sd->flags & SD_SHARE_CPUCAPACITY) && !is_core_idle(cpu)) {
> > + if (idle_smt == -1)
> > + idle_smt = cpu;
> > + continue;
> > + }
> > + }
>
> Not only does that bust CodingStyle, it's also entirely daft. What
> exactly is the purpose of that else statement?
>
>
Yeah, that's a dumb "else" statement. Will remove that.
Tim
Powered by blists - more mailing lists