From: Mel Gorman <mgorman@techsingularity.net>
To: Rik van Riel <riel@surriel.com>
Cc: Vincent Guittot <vincent.guittot@linaro.org>,
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 degree of load imbalance between SD_NUMA domains
Date: Thu, 19 Dec 2019 08:41:34 +0000 [thread overview]
Message-ID: <20191219084134.GH3178@techsingularity.net> (raw)
In-Reply-To: <37ec5587dbb4035b883e5a69b56da4cc67f0e5ff.camel@surriel.com>
On Wed, Dec 18, 2019 at 09:58:01PM -0500, Rik van Riel wrote:
> On Wed, 2019-12-18 at 15:44 +0000, Mel Gorman wrote:
>
> > + /*
> > + * Ignore imbalance unless busiest sd is close
> > to 50%
> > + * utilisation. At that point balancing for
> > memory
> > + * bandwidth and potentially avoiding
> > unnecessary use
> > + * of HT siblings is as relevant as memory
> > locality.
> > + */
> > + imbalance_max = (busiest->group_weight >> 1) -
> > imbalance_adj;
> > + if (env->imbalance <= imbalance_adj &&
> > + busiest->sum_nr_running < imbalance_max) {
> > + env->imbalance = 0;
> > + }
> > + }
> > return;
> > }
>
> I can see how the 50% point is often great for HT,
> but I wonder if that is also the case for SMT4 and
> SMT8 systems...
>
Maybe, maybe not but it's not the most important concern. The highlight
in the comment was about memory bandwidth and HT was simply an additional
concern. Ideally memory bandwidth and consumption would be taken into
account but we know nothing about either. Even if peak memory bandwidth
was known, the reference pattern matters a *lot* which can be readily
illustrated by using STREAM and observing the different bandwidths for
different reference patterns. Similarly, while we might know pages that
were referenced, we do not know the bandwidth consumption without taking
additional overhead with a PMU. Hence, it makes sense to at least hope
that the active tasks have similar memory bandwidth requirements and load
balance as normal when we are near the 50% active tasks/busy CPUs. If
SMT4 or SMT8 have different requirements or it matters for memory
bandwidth then it would need to be carefully examined by someone with
access to such hardware to determine an arch-specific and maybe even a
per-CPU-family cutoff.
In the context of this patch, it unconditionally makes sense that the
basic case of two communicating tasks are not migrating cross-node on
wakeup and then again on load balance.
--
Mel Gorman
SUSE Labs
next prev parent reply other threads:[~2019-12-19 8:41 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-18 15:44 [PATCH] sched, fair: Allow a small degree of load imbalance between SD_NUMA domains Mel Gorman
2019-12-18 18:50 ` Valentin Schneider
2019-12-18 22:50 ` Mel Gorman
2019-12-19 11:56 ` Valentin Schneider
2019-12-19 10:02 ` Peter Zijlstra
2019-12-19 11:46 ` Valentin Schneider
2019-12-19 14:23 ` Valentin Schneider
2019-12-19 15:23 ` Mel Gorman
2019-12-18 18:54 ` Valentin Schneider
2019-12-19 2:58 ` Rik van Riel
2019-12-19 8:41 ` Mel Gorman [this message]
2019-12-19 10:04 ` Peter Zijlstra
2019-12-19 14:45 ` Vincent Guittot
2019-12-19 15:16 ` Valentin Schneider
2019-12-19 15:18 ` Mel Gorman
2019-12-19 15:41 ` Vincent Guittot
2019-12-19 15:58 ` Mel Gorman
2019-12-20 13:00 ` Srikar Dronamraju
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=20191219084134.GH3178@techsingularity.net \
--to=mgorman@techsingularity.net \
--cc=Morten.Rasmussen@arm.com \
--cc=dietmar.eggemann@arm.com \
--cc=hdanton@sina.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=parth@linux.ibm.com \
--cc=pauld@redhat.com \
--cc=peterz@infradead.org \
--cc=quentin.perret@arm.com \
--cc=riel@surriel.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