lkml.org 
[lkml]   [2008]   [Feb]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Regression with sched yield - 2.6.25-rc2-mm1
From
Date

On Mon, 2008-02-18 at 20:18 +0530, Balbir Singh wrote:

> > Humm, the check that should have avoided that is:
> >
> > /*
> > * Are we the only task in the tree?
> > */
> > if (unlikely(rq->load.weight == curr->se.load.weight))
> > return;
> >
> >
> > But I guess that overlooks rt tasks, they also increase the load.
> > So I guess something like this ought to fix it..
> >
>
> Peter,
>
> I don't remember any real time tasks running on the system, so I would be
> surprised if that is indeed the case.

Various kthreads have rt prio. Notably the load_balancer_monitor().

> Having said that, rightmost was indeed
> NULL, so I need to figure out why it was. The other question is why would a real
> time task be found by sched_yield_fair?

Because a rt task contributes weight and would make the test above fail
because rt->load would be larger than expected.

> > diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
> > index b9ade89..83eb30c 100644
> > --- a/kernel/sched_fair.c
> > +++ b/kernel/sched_fair.c
> > @@ -998,7 +998,7 @@ static void yield_task_fair(struct rq *rq)
> > /*
> > * Already in the rightmost position?
> > */
> > - if (unlikely(rightmost->vruntime < se->vruntime))
> > + if (unlikely(!rightmost || rightmost->vruntime < se->vruntime))
> > return;
> >
> > /*
> >



\
 
 \ /
  Last update: 2008-02-18 16:21    [W:0.061 / U:0.848 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site