Messages in this thread | | | Subject | Re: Bug in scheduler when using rt_mutex | From | Peter Zijlstra <> | Date | Fri, 21 Jan 2011 14:40:58 +0100 |
| |
On Fri, 2011-01-21 at 20:24 +0800, Yong Zhang wrote: > > Index: linux-2.6/kernel/sched.c > > =================================================================== > > --- linux-2.6.orig/kernel/sched.c > > +++ linux-2.6/kernel/sched.c > > @@ -2624,6 +2624,8 @@ void sched_fork(struct task_struct *p, i > > > > if (!rt_prio(p->prio)) > > p->sched_class = &fair_sched_class; > > + else > > + p->se.vruntime = 0; > > This can be moved to __sched_fork()
But we cannot do it unconditionally, we want to inherit the parent's ->vruntime when we're a fair task clone.
| |