[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20200106171918.GD3466@techsingularity.net>
Date: Mon, 6 Jan 2020 17:19:18 +0000
From: Mel Gorman <mgorman@...hsingularity.net>
To: Rik van Riel <riel@...riel.com>
Cc: Vincent Guittot <vincent.guittot@...aro.org>,
Ingo Molnar <mingo@...nel.org>,
Peter Zijlstra <peterz@...radead.org>, pauld@...hat.com,
valentin.schneider@....com, srikar@...ux.vnet.ibm.com,
quentin.perret@....com, dietmar.eggemann@....com,
Morten.Rasmussen@....com, hdanton@...a.com, parth@...ux.ibm.com,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] sched, fair: Allow a small load imbalance between low
utilisation SD_NUMA domains v3
On Mon, Jan 06, 2020 at 11:44:57AM -0500, Rik van Riel wrote:
> On Mon, 2020-01-06 at 16:33 +0000, Mel Gorman wrote:
> > On Mon, Jan 06, 2020 at 10:47:18AM -0500, Rik van Riel wrote:
> > > > + imbalance_adj = (100 / (env->sd->imbalance_pct
> > > > - 100)) - 1;
> > > > +
> > > > + /*
> > > > + * Allow small imbalances when the busiest
> > > > group has
> > > > + * low utilisation.
> > > > + */
> > > > + imbalance_max = imbalance_adj << 1;
> > > > + if (busiest->sum_nr_running < imbalance_max)
> > > > + env->imbalance -= min(env->imbalance,
> > > > imbalance_adj);
> > > > + }
> > > > +
> > >
> > > Wait, so imbalance_max is a function only of
> > > env->sd->imbalance_pct, and it gets compared
> > > against busiest->sum_nr_running, which is related
> > > to the number of CPUs in the node?
> > >
> >
> > It's not directly related to the number of CPUs in the node. Are you
> > thinking of busiest->group_weight?
>
> I am, because as it is right now that if condition
> looks like it might never be true for imbalance_pct 115.
>
True but while imbalance_pct has the possibility of being something
other than 125 for SD_NUMA, I'm not aware of a case where it happens.
If/when it does, it would be worth reconsidering the threshold.
> Presumably you put that check there for a reason, and
> would like it to trigger when the amount by which a node
> is busy is less than 2 * (imbalance_pct - 100).
Yes, it's there for a reason. The intent is to only allow the imbalance for
low utilisation. Too many corner cases were hit otherwise -- utilisation
near a nodes capacity, highly parallelised workloads wanting to balance
as quickly as possible etc. In this version, the only case that really
is being handled is one where the utilisation of a NUMA machine is low
which happens often enough to be interesting.
--
Mel Gorman
SUSE Labs
Powered by blists - more mailing lists