From: Rik van Riel <riel@redhat.com>
To: dedekind1@gmail.com
Cc: linux-kernel@vger.kernel.org, mgorman@suse.de,
peterz@infradead.org, jhladky@redhat.com
Subject: Re: [PATCH] numa,sched: only consider less busy nodes as numa balancing destination
Date: Tue, 12 May 2015 11:45:09 -0400 [thread overview]
Message-ID: <55522005.1080705@redhat.com> (raw)
In-Reply-To: <1431438610.20417.0.camel@sauron.fi.intel.com>
On 05/12/2015 09:50 AM, Artem Bityutskiy wrote:
> On Fri, 2015-05-08 at 16:03 -0400, Rik van Riel wrote:
>> Currently the load balancer has a preference for moving
>> tasks to their preferred nodes (NUMA_FAVOUR_HIGHER, true),
>> but there is no resistance to moving tasks away from their
>> preferred nodes (NUMA_RESIST_LOWER, false). That setting
>> was arrived at after a fair amount of experimenting, and
>> is probably correct.
>
> FYI, (NUMA_RESIST_LOWER, true) does not make any difference for me.
I am not surprised by this.
The idle balancing code will simply take a runnable-but-not-running
task off the run queue of the busiest CPU in the system. On a system
with some idle time, it is likely there are only one or two tasks
available on the run queue of the busiest CPU, which leaves little or
no choice to the NUMA_FAVOUR_HIGHER and NUMA_RESIST_LOWER code.
The idle balancing code, through find_busiest_queue() already tries
to select a CPU where at least one of the runnable tasks is on the
wrong NUMA node.
However, that task may well be the current task, leading us to steal
the other (runnable but on the queue) task instead, moving that one
to the wrong NUMA node.
I have a few poorly formed ideas on what could be done about that:
1) have fbq_classify_rq take the current task on the rq into account,
and adjust the fbq classification if all the runnable-but-queued
tasks are on the right node
2) ensure that rq->nr_numa_running and rq->nr_preferred_running also
get incremented for kernel threads that are bound to a particular
CPU - currently CPU-bound kernel threads will cause the NUMA
statistics to look like a CPU has tasks that do not belong on that
NUMA node
3) have detach_tasks take env->fbq_type into account when deciding
whether to look at NUMA affinity at all
4) maybe have detach_tasks fail if env->fbq_type is regular or remote,
but no !numa or on-the-wrong-node tasks were found ? not sure if
that would cause problems, or what kind...
--
All rights reversed
next prev parent reply other threads:[~2015-05-12 15:45 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-06 10:35 autoNUMA web workload regression Artem Bityutskiy
2015-05-06 10:37 ` Bityutskiy, Artem
2015-05-06 14:40 ` Rik van Riel
2015-05-06 15:41 ` [PATCH] numa,sched: only consider less busy nodes as numa balancing destination Rik van Riel
2015-05-06 17:00 ` Peter Zijlstra
2015-05-06 17:06 ` Rik van Riel
2015-05-07 13:29 ` Artem Bityutskiy
2015-05-08 13:13 ` Artem Bityutskiy
2015-05-08 20:03 ` Rik van Riel
2015-05-08 22:52 ` Rik van Riel
2015-05-11 11:11 ` Artem Bityutskiy
2015-05-11 14:20 ` Rik van Riel
2015-05-12 13:50 ` Artem Bityutskiy
2015-05-12 15:45 ` Rik van Riel [this message]
2015-05-13 6:29 ` Peter Zijlstra
2015-05-13 6:31 ` Peter Zijlstra
2015-05-13 10:59 ` Artem Bityutskiy
2015-05-13 13:51 ` Rik van Riel
2015-05-11 12:44 ` Jirka Hladky
2015-05-11 14:44 ` Rik van Riel
2015-05-26 20:29 ` Rik van Riel
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=55522005.1080705@redhat.com \
--to=riel@redhat.com \
--cc=dedekind1@gmail.com \
--cc=jhladky@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=peterz@infradead.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