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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <CAJd=RBASBZQj+s_M3uUgPn5v+LL-6Rmst1vR1T4eTj29Z5EgVw@mail.gmail.com>
Date:	Sat, 17 Nov 2012 13:23:32 +0800
From:	Hillf Danton <dhillf@...il.com>
To:	Mel Gorman <mgorman@...e.de>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	Hillf Danton <dhillf@...il.com>
Subject: [PATCH 5/5] balancenuma: no task swap in finding placement

Node is selected on behalf of given task, but no reason to punish
the currently running tasks on other nodes. That punishment maybe benifit,
who knows. Better if they are treated not in random way.

Signed-off-by: Hillf Danton <dhillf@...il.com>
---

--- a/kernel/sched/fair.c	Sat Nov 17 12:29:08 2012
+++ b/kernel/sched/fair.c	Sat Nov 17 12:34:52 2012
@@ -872,7 +872,7 @@ static inline unsigned long balancenuma_

 /*
  * Examines all other nodes examining remote tasks to see if there would
- * be fewer remote numa faults if tasks swapped home nodes
+ * be fewer remote numa faults
  */
 static void task_numa_find_placement(struct task_struct *p)
 {
@@ -933,13 +933,6 @@ static void task_numa_find_placement(str
 				continue;
 			}

-			/* Ensure the other task can be swapped */
-			if (!cpumask_test_cpu(this_cpu,
-					      tsk_cpus_allowed(other_task))) {
-				raw_spin_unlock_irq(&rq->lock);
-				continue;
-			}
-
 			/*
 			 * Read the fault statistics. If the remote task is a
 			 * thread in the process then use the task statistics.
@@ -973,8 +966,7 @@ compare_other:
 			this_diff = this_weight - p_weight;

 			/*
-			 * Would swapping the tasks reduce the overall
-			 * cross-node NUMA faults?
+			 * Would nid reduce the overall cross-node NUMA faults?
 			 */
 			if (other_diff > 0 && this_diff > 0) {
 				long weight_diff = other_diff + this_diff;
@@ -995,11 +987,8 @@ compare_other:
 		}
 	}

-	/* Swap the task on the selected target node */
 	if (selected_nid != -1) {
 		sched_setnode(p, selected_nid);
-		if (selected_task)
-			sched_setnode(selected_task, this_nid);
 	}
 }

--
--
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