From: Michael wang <wangyun@linux.vnet.ibm.com>
To: Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Mel Gorman <mgorman@suse.de>, LKML <linux-kernel@vger.kernel.org>
Subject: [RFC][PATCH] sched/numa: fix the wrong logical inside task_numa_migrate()
Date: Mon, 14 Oct 2013 17:20:00 +0800 [thread overview]
Message-ID: <525BB740.2010906@linux.vnet.ibm.com> (raw)
As the comment said, we want a node benefit BOTH task and group, thus the
condition to skip the node should be:
taskimp < 0 || groupimp < 0
CC: Mel Gorman <mgorman@suse.de>
CC: Ingo Molnar <mingo@redhat.com>
CC: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Michael Wang <wangyun@linux.vnet.ibm.com>
---
kernel/sched/fair.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 803e343..53e3ba9 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -1225,7 +1225,7 @@ static int task_numa_migrate(struct task_struct *p)
/* Only consider nodes where both task and groups benefit */
taskimp = task_weight(p, nid) - taskweight;
groupimp = group_weight(p, nid) - groupweight;
- if (taskimp < 0 && groupimp < 0)
+ if (taskimp < 0 || groupimp < 0)
continue;
env.dst_nid = nid;
--
1.7.9.5
reply other threads:[~2013-10-14 9:20 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=525BB740.2010906@linux.vnet.ibm.com \
--to=wangyun@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.