[patch] BFS 420: no update of task cpu when changing cpu affinity

From: Hillf Danton
Date: Sun May 27 2012 - 07:46:00 EST


Since task cpu is involved in the computation of difference of locality, we
have to delay updating it until the task will be taken off the global runqueue.

If given task is a sleeper, no problem since it has to be activated first.

--- a/kernel/sched/bfs.c Mon May 14 20:50:38 2012
+++ b/kernel/sched/bfs.c Sun May 27 09:38:00 2012
@@ -5117,8 +5117,7 @@ int set_cpus_allowed_ptr(struct task_str
running_wrong = true;
} else
resched_task(p);
- } else
- set_task_cpu(p, cpumask_any_and(cpu_active_mask, new_mask));
+ }

out:
if (queued)
--
--
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/