[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <04033a63f11a9c59ebd2b099355915e4e889b772.camel@surriel.com>
Date: Mon, 06 Jan 2020 10:47:18 -0500
From: Rik van Riel <riel@...riel.com>
To: Mel Gorman <mgorman@...hsingularity.net>,
Vincent Guittot <vincent.guittot@...aro.org>
Cc: 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, 2020-01-06 at 14:42 +0000, Mel Gorman wrote:
>
> +
> + /* Consider allowing a small imbalance between NUMA
> groups */
> + if (env->sd->flags & SD_NUMA) {
> + long imbalance_adj, imbalance_max;
> +
> + /*
> + * imbalance_adj is the allowable degree of
> imbalance
> + * to exist between two NUMA domains.
> imbalance_pct
> + * is used to estimate the number of active
> tasks
> + * needed before memory bandwidth may be as
> important
> + * as memory locality.
> + */
> + 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?
Lets see how this works out for different numbers
of CPUs in each node.
With imbalance_pct == 115, we end up with
imbalance_adj = (100 / (115 - 100)) - 1 = 0.18,
which gets rounded down to 0.
Wait, never mind the different numbers of CPUs.
Am I overlooking something, or did you mean to have
a factor of number of CPUs in the imbalance_adj
calculation?
kind regards,
Rik
--
All Rights Reversed.
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists