lkml.org 
[lkml]   [2020]   [Jan]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] sched, fair: Allow a small load imbalance between low utilisation SD_NUMA domains v3
From
Date
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.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2020-01-06 16:48    [W:0.104 / U:7.224 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site