The patch titled sched: fix bug in __migrate_task() has been added to the -mm tree. Its filename is sched-fix-bug-in-__migrate_task.patch See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: sched: fix bug in __migrate_task() From: Peter Williams <pwil3058@xxxxxxxxxxxxxx> Problem: In the function __migrate_task(), deactivate_task() followed by activate_task() is used to move the task from one run queue to another. This has two undesirable effects: 1. The task's priority is recalculated. (Nowhere else in the scheduler code is the priority recalculated for a change of CPU.) 2. The task's time stamp is set to the current time. At the very least, this makes the adjustment of the time stamp before the call to deactivate_task() redundant but I believe the problem is more serious as the time stamp now holds the time of the queue change instead of the time at which the task was woken. In addition, unless dest_rq is the same queue as "current" is on the time stamp could be inaccurate due to inter CPU drift. Solution: Replace the call to activate_task() with one to __activate_task(). Signed-off-by: Peter Williams <pwil3058@xxxxxxxxxxxxxx> Cc: Ingo Molnar <mingo@xxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- kernel/sched.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -puN kernel/sched.c~sched-fix-bug-in-__migrate_task kernel/sched.c --- a/kernel/sched.c~sched-fix-bug-in-__migrate_task +++ a/kernel/sched.c @@ -4892,7 +4892,7 @@ static int __migrate_task(struct task_st p->timestamp = p->timestamp - rq_src->timestamp_last_tick + rq_dest->timestamp_last_tick; deactivate_task(p, rq_src); - activate_task(p, rq_dest, 0); + __activate_task(p, rq_dest); if (TASK_PREEMPTS_CURR(p, rq_dest)) resched_task(rq_dest->curr); } _ Patches currently in -mm which might be from pwil3058@xxxxxxxxxxxxxx are origin.patch sched-implement-smpnice.patch sched-modify-move_tasks-to-improve-load-balancing-outcomes.patch sched-avoid-unnecessarily-moving-highest-priority-task-move_tasks.patch sched-uninline-task_rq_lock.patch pi-futex-scheduler-support-for-pi.patch sched-fix-bug-in-__migrate_task.patch sched-add-above-background-load-function.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html