aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSrivatsa Vaddagiri <vatsa@linux.vnet.ibm.com>2007-10-15 11:00:12 -0400
committerIngo Molnar <mingo@elte.hu>2007-10-15 11:00:12 -0400
commit2830cf8c90f37526d401f1999250312df970bfa3 (patch)
tree9f40ff1f624cba21be3db086d3d87716e0b1f66f
parent2d72376b3af1e7d4d4515ebfd0f4383f2e92c343 (diff)
sched: group scheduler SMP migration fix
group scheduler SMP migration fix: use task_cfs_rq(p) to get to the relevant fair-scheduling runqueue of a task, rq->cfs is not the right one. Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r--kernel/sched.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index ba9fa6c0ab65..e1657e0c86d0 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -1040,6 +1040,8 @@ void set_task_cpu(struct task_struct *p, unsigned int new_cpu)
1040{ 1040{
1041 int old_cpu = task_cpu(p); 1041 int old_cpu = task_cpu(p);
1042 struct rq *old_rq = cpu_rq(old_cpu), *new_rq = cpu_rq(new_cpu); 1042 struct rq *old_rq = cpu_rq(old_cpu), *new_rq = cpu_rq(new_cpu);
1043 struct cfs_rq *old_cfsrq = task_cfs_rq(p),
1044 *new_cfsrq = cpu_cfs_rq(old_cfsrq, new_cpu);
1043 u64 clock_offset; 1045 u64 clock_offset;
1044 1046
1045 clock_offset = old_rq->clock - new_rq->clock; 1047 clock_offset = old_rq->clock - new_rq->clock;
@@ -1052,7 +1054,8 @@ void set_task_cpu(struct task_struct *p, unsigned int new_cpu)
1052 if (p->se.block_start) 1054 if (p->se.block_start)
1053 p->se.block_start -= clock_offset; 1055 p->se.block_start -= clock_offset;
1054#endif 1056#endif
1055 p->se.vruntime -= old_rq->cfs.min_vruntime - new_rq->cfs.min_vruntime; 1057 p->se.vruntime -= old_cfsrq->min_vruntime -
1058 new_cfsrq->min_vruntime;
1056 1059
1057 __set_task_cpu(p, new_cpu); 1060 __set_task_cpu(p, new_cpu);
1058} 1061}