lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Date:	Mon, 14 Oct 2013 17:20:00 +0800
From:	Michael wang <wangyun@...ux.vnet.ibm.com>
To:	Ingo Molnar <mingo@...hat.com>,
	Peter Zijlstra <peterz@...radead.org>,
	Mel Gorman <mgorman@...e.de>,
	LKML <linux-kernel@...r.kernel.org>
Subject: [RFC][PATCH] sched/numa: fix the wrong logical inside task_numa_migrate()

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@...e.de>
CC: Ingo Molnar <mingo@...hat.com>
CC: Peter Zijlstra <peterz@...radead.org>
Signed-off-by: Michael Wang <wangyun@...ux.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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ