[PATCH 45/46] balancenuma: no task swap in finding placement
From: Mel Gorman
Date: Wed Nov 21 2012 - 05:23:30 EST
From: Hillf Danton <dhillf@xxxxxxxxx>
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@xxxxxxxxx>
---
kernel/sched/fair.c | 15 ++-------------
1 file changed, 2 insertions(+), 13 deletions(-)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 2c9300f..5cc5b60 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -873,7 +873,7 @@ static inline unsigned long balancenuma_mm_weight(struct task_struct *p,
/*
* 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)
{
@@ -932,13 +932,6 @@ static void task_numa_find_placement(struct task_struct *p)
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.
@@ -972,8 +965,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;
@@ -994,11 +986,8 @@ compare_other:
}
}
- /* Swap the task on the selected target node */
if (selected_nid != -1 && selected_nid != this_nid) {
sched_setnode(p, selected_nid);
- if (selected_task)
- sched_setnode(selected_task, this_nid);
}
}
--
1.7.9.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/