From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: balbir@linux.vnet.ibm.com
Cc: Ingo Molnar <mingo@elte.hu>,
Dhaval Giani <dhaval@linux.vnet.ibm.com>,
Srivatsa Vaddagiri <vatsa@in.ibm.com>,
Andrew Morton <akpm@linux-foundation.org>,
"Zhang, Yanmin" <yanmin_zhang@linux.intel.com>,
linux kernel mailing list <linux-kernel@vger.kernel.org>
Subject: Re: Regression with sched yield - 2.6.25-rc2-mm1
Date: Mon, 18 Feb 2008 16:18:53 +0100 [thread overview]
Message-ID: <1203347933.10858.8.camel@lappy> (raw)
In-Reply-To: <47B99AB4.3020604@linux.vnet.ibm.com>
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;
> >
> > /*
> >
next prev parent reply other threads:[~2008-02-18 15:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-18 12:17 Regression with sched yield - 2.6.25-rc2-mm1 Balbir Singh
[not found] ` <1203338377.10858.3.camel@lappy>
2008-02-18 14:48 ` Balbir Singh
2008-02-18 15:18 ` Peter Zijlstra [this message]
2008-02-18 15:19 ` Balbir Singh
2008-02-18 15:35 ` Peter Zijlstra
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1203347933.10858.8.camel@lappy \
--to=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=balbir@linux.vnet.ibm.com \
--cc=dhaval@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=vatsa@in.ibm.com \
--cc=yanmin_zhang@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox