lkml.org 
[lkml]   [2012]   [Nov]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
Subject[PATCH 5/5] balancenuma: no task swap in finding placement
From
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@gmail.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);
}
}

--

\
 
 \ /
  Last update: 2012-11-17 07:01    [W:0.024 / U:0.344 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site