From: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
To: Ingo Molnar <mingo@kernel.org>, Peter Zijlstra <peterz@infradead.org>
Cc: linux-kernel@vger.kernel.org, srikar@linux.vnet.ibm.com,
Rik van Riel <riel@redhat.com>, Mel Gorman <mgorman@suse.de>
Subject: [PATCH v2 4/4] sched:Use correct nid while evaluating task weights
Date: Tue, 16 Jun 2015 17:26:02 +0530 [thread overview]
Message-ID: <1434455762-30857-5-git-send-email-srikar@linux.vnet.ibm.com> (raw)
In-Reply-To: <1434455762-30857-1-git-send-email-srikar@linux.vnet.ibm.com>
In task_numa_migrate(), while evaluating other nodes for group
consolidation, env.dst_nid is used instead of using the iterator nid.
Using env.dst_nid would mean dist is always the same. Infact the same
dist was calculated above while evaluating the preferred node.
Fix the above to use the iterator nid.
Also the task/group weights from the src_nid should be calculated
irrespective of numa topology type.
Signed-off-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
---
kernel/sched/fair.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index d1aa374..e1b3393 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -1493,9 +1493,8 @@ static int task_numa_migrate(struct task_struct *p)
if (nid == env.src_nid || nid == p->numa_preferred_nid)
continue;
- dist = node_distance(env.src_nid, env.dst_nid);
- if (sched_numa_topology_type == NUMA_BACKPLANE &&
- dist != env.dist) {
+ dist = node_distance(env.src_nid, nid);
+ if (dist != env.dist) {
taskweight = task_weight(p, env.src_nid, dist);
groupweight = group_weight(p, env.src_nid, dist);
}
--
1.8.3.1
next prev parent reply other threads:[~2015-06-16 11:57 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-16 11:55 [PATCH v2 0/4] Improve numa load balancing Srikar Dronamraju
2015-06-16 11:55 ` [PATCH v2 1/4] sched/tip:Prefer numa hotness over cache hotness Srikar Dronamraju
2015-07-06 15:50 ` [tip:sched/core] sched/numa: Prefer NUMA " tip-bot for Srikar Dronamraju
2015-07-07 0:19 ` Srikar Dronamraju
2015-07-08 13:31 ` Srikar Dronamraju
2015-07-07 6:49 ` tip-bot for Srikar Dronamraju
2015-06-16 11:56 ` [PATCH v2 2/4] sched:Consider imbalance_pct when comparing loads in numa_has_capacity Srikar Dronamraju
2015-06-16 14:39 ` Rik van Riel
2015-06-22 16:29 ` Srikar Dronamraju
2015-06-23 1:18 ` Rik van Riel
2015-06-23 8:10 ` Ingo Molnar
2015-06-23 13:01 ` Srikar Dronamraju
2015-06-23 14:36 ` Ingo Molnar
2015-07-06 15:50 ` [tip:sched/core] sched/numa: Consider 'imbalance_pct' when comparing loads in numa_has_capacity() tip-bot for Srikar Dronamraju
2015-07-07 6:49 ` tip-bot for Srikar Dronamraju
2015-06-16 11:56 ` [PATCH v2 3/4] sched:Fix task_numa_migrate to always update preferred node Srikar Dronamraju
2015-06-16 14:54 ` Rik van Riel
2015-06-16 17:19 ` Srikar Dronamraju
2015-06-16 18:25 ` Rik van Riel
2015-06-16 17:18 ` Rik van Riel
2015-06-16 11:56 ` Srikar Dronamraju [this message]
2015-06-16 15:00 ` [PATCH v2 4/4] sched:Use correct nid while evaluating task weights Rik van Riel
2015-06-16 17:26 ` 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=1434455762-30857-5-git-send-email-srikar@linux.vnet.ibm.com \
--to=srikar@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=riel@redhat.com \
/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
all inboxes | Powered by JetHome®