public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Rik van Riel <riel@redhat.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: dedekind1@gmail.com, linux-kernel@vger.kernel.org,
	mgorman@suse.de, jhladky@redhat.com
Subject: Re: [PATCH] numa,sched: only consider less busy nodes as numa balancing destination
Date: Wed, 13 May 2015 09:51:36 -0400	[thread overview]
Message-ID: <555356E8.5000307@redhat.com> (raw)
In-Reply-To: <20150513062906.GJ3007@worktop.Skamania.guest>

On 05/13/2015 02:29 AM, Peter Zijlstra wrote:
> On Tue, May 12, 2015 at 11:45:09AM -0400, Rik van Riel wrote:
>> 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
> 
> So while looking at this I came up with the below; it treats anything
> inside ->active_nodes as a preferred node for balancing purposes.
> 
> Would that make sense?

Not necessarily.

If there are two workloads on a multi-threaded system, and they
have not yet converged on one node each, both nodes will be part
of ->active_nodes.

Treating them as preferred nodes means the load balancing code
would do nothing at all to help the workloads converge.

> I'll see what I can do about current in the runqueue type
> classification.

This can probably be racy, so just checking a value in the
current task struct for the runqueue should be ok. I am not
aware of any architecture where the task struct address can
become invalid. Worst thing that could happen is that the
bits examined change value.

>> 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
> 
> I'm thinking accounting those to nr_pinned, lemme see how that works
> out.

Cool.

-- 
All rights reversed

  parent reply	other threads:[~2015-05-13 13:52 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
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 [this message]
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=555356E8.5000307@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