[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1295622627.28776.295.camel@laptop>
Date: Fri, 21 Jan 2011 16:10:27 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Yong Zhang <yong.zhang0@...il.com>
Cc: Mike Galbraith <efault@....de>, samu.p.onkalo@...ia.com,
mingo@...e.hu,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
tglx <tglx@...utronix.de>, Steven Rostedt <rostedt@...dmis.org>
Subject: Re: Bug in scheduler when using rt_mutex
On Fri, 2011-01-21 at 23:03 +0800, Yong Zhang wrote:
> On Fri, Jan 21, 2011 at 02:40:58PM +0100, Peter Zijlstra wrote:
> > 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.
>
> Doesn't task_fork_fair()(which is called after __sched_fork())
> take the inherit job?
>
> Am I missing something?
Ah, indeed, we do the place_entity(.initial=1) thing there
unconditionally. For some reason I thought we relied on the inherited
vruntime.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists