Messages in this thread Patch in this message | | | Date | Tue, 25 Sep 2007 13:33:06 +0200 | From | Ingo Molnar <> | Subject | Re: [git] CFS-devel, latest code |
| |
* Ingo Molnar <mingo@elte.hu> wrote:
> hm. perhaps this fixup in kernel/sched.c:set_task_cpu(): > > p->se.vruntime -= old_rq->cfs.min_vruntime - new_rq->cfs.min_vruntime; > > needs to become properly group-hierarchy aware?
a quick first stab like the one below does not appear to solve the problem.
Ingo
-------------------> Subject: sched: group scheduler SMP migration fix From: Ingo Molnar <mingo@elte.hu>
group scheduler SMP migration fix.
Signed-off-by: Ingo Molnar <mingo@elte.hu> --- kernel/sched.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
Index: linux/kernel/sched.c =================================================================== --- linux.orig/kernel/sched.c +++ linux/kernel/sched.c @@ -1039,7 +1039,8 @@ void set_task_cpu(struct task_struct *p, { int old_cpu = task_cpu(p); struct rq *old_rq = cpu_rq(old_cpu), *new_rq = cpu_rq(new_cpu); - u64 clock_offset; + struct sched_entity *se; + u64 clock_offset, voffset; clock_offset = old_rq->clock - new_rq->clock; @@ -1051,7 +1052,11 @@ void set_task_cpu(struct task_struct *p, if (p->se.block_start) p->se.block_start -= clock_offset; #endif - p->se.vruntime -= old_rq->cfs.min_vruntime - new_rq->cfs.min_vruntime; + + se = &p->se; + voffset = old_rq->cfs.min_vruntime - new_rq->cfs.min_vruntime; + for_each_sched_entity(se) + se->vruntime -= voffset; __set_task_cpu(p, new_cpu); } - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |