mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Rik van Riel <riel@surriel.com>
To: Mel Gorman <mgorman@techsingularity.net>,
	Vincent Guittot <vincent.guittot@linaro.org>
Cc: Ingo Molnar <mingo@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	pauld@redhat.com, valentin.schneider@arm.com,
	srikar@linux.vnet.ibm.com, quentin.perret@arm.com,
	dietmar.eggemann@arm.com, Morten.Rasmussen@arm.com,
	hdanton@sina.com, parth@linux.ibm.com,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] sched, fair: Allow a small load imbalance between low utilisation SD_NUMA domains v3
Date: Mon, 06 Jan 2020 10:47:18 -0500	[thread overview]
Message-ID: <04033a63f11a9c59ebd2b099355915e4e889b772.camel@surriel.com> (raw)
In-Reply-To: <20200106144250.GA3466@techsingularity.net>

[-- Attachment #1: Type: text/plain, Size: 1482 bytes --]

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.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2020-01-06 15:48 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-06 14:42 Mel Gorman
2020-01-06 15:47 ` Rik van Riel [this message]
2020-01-06 16:33   ` Mel Gorman
2020-01-06 16:44     ` Rik van Riel
2020-01-06 17:19       ` Mel Gorman
     [not found]     ` <20200107015111.4836-1-hdanton@sina.com>
2020-01-07  8:44       ` Vincent Guittot
2020-01-07  9:12       ` Mel Gorman
2020-01-07  9:43         ` Vincent Guittot
2020-01-07 10:16           ` Mel Gorman
2020-01-08 15:49             ` Valentin Schneider

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=04033a63f11a9c59ebd2b099355915e4e889b772.camel@surriel.com \
    --to=riel@surriel.com \
    --cc=Morten.Rasmussen@arm.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=hdanton@sina.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgorman@techsingularity.net \
    --cc=mingo@kernel.org \
    --cc=parth@linux.ibm.com \
    --cc=pauld@redhat.com \
    --cc=peterz@infradead.org \
    --cc=quentin.perret@arm.com \
    --cc=srikar@linux.vnet.ibm.com \
    --cc=valentin.schneider@arm.com \
    --cc=vincent.guittot@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome