[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130826113859.GI31370@twins.programming.kicks-ass.net>
Date: Mon, 26 Aug 2013 13:38:59 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Paul Turner <pjt@...gle.com>
Cc: Ingo Molnar <mingo@...nel.org>,
Joonsoo Kim <iamjoonsoo.kim@....com>,
LKML <linux-kernel@...r.kernel.org>,
Mike Galbraith <efault@....de>, Alex Shi <alex.shi@...el.com>,
Preeti U Murthy <preeti@...ux.vnet.ibm.com>,
Vincent Guittot <vincent.guittot@...aro.org>,
Morten Rasmussen <morten.rasmussen@....com>,
Namhyung Kim <namhyung@...nel.org>,
Lei Wen <leiwen@...vell.com>, Rik van Riel <riel@...riel.com>,
Joonsoo Kim <js1304@...il.com>
Subject: Re: [PATCH 03/10] sched: Clean-up struct sd_lb_stat
On Sat, Aug 24, 2013 at 03:09:38AM -0700, Paul Turner wrote:
> On Mon, Aug 19, 2013 at 9:01 AM, Peter Zijlstra <peterz@...radead.org> wrote:
> > + struct sg_lb_stats *this, *busiest;
>
> "this" is a little confusing to read; mainly because elsewhere we've
> tied this to "this cpu" whereas the local sched group is arger. (Not
> to mention the obvious OOP-land overloading of "this->".)
>
> Perhaps %s/this/local/ for sg_lb_stat references? Including this_stat
> -> local_stat on sd_lb_stats?
fair enough, I'll edit the thing to be local.
> > @@ -4952,15 +4950,16 @@ find_busiest_group(struct lb_env *env)
> > * there is no imbalance between this and busiest group
> > * wrt to idle cpu's, it is balanced.
> > */
> > - if ((sds.this_idle_cpus <= sds.busiest_idle_cpus + 1) &&
> > - sds.busiest_nr_running <= sds.busiest_group_weight)
> > + if ((this->idle_cpus <= busiest->idle_cpus + 1) &&
> > + busiest->sum_nr_running <= busiest->group_weight)
>
> While we're improving readability: idle_cpus < busiest->idle_cpus ?
Right, took that.
> This check has always been a little oddly asymmetric in that:
> group_weight - sum_nr_running <= idle_cpus
>
> This allows the case where our group has pulled lots of work to one of
> its cpus, but not yet spread that out, but still keep trying to
> balance because idle_cpus is high.
>
> This is more food for thought since this patch is not changing functionality.
Right, I saw the same and made a note to look at it later. I suppose
later never happens though :/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists