Messages in this thread |  | | Subject | Re: [PATCH] sched, fair: Allow a small load imbalance between low utilisation SD_NUMA domains v3 | From | Rik van Riel <> | Date | Mon, 06 Jan 2020 10:47:18 -0500 |
| |
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] |  |