From: Mike Galbraith <efault@gmx.de>
To: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Brian Rogers <brian@xyzw.org>, Ingo Molnar <mingo@elte.hu>,
linux-kernel@vger.kernel.org
Subject: Re: [BUG] How to get real-time priority using idle priority
Date: Thu, 15 Jan 2009 11:30:23 +0100 [thread overview]
Message-ID: <1232015423.13856.5.camel@marge.simson.net> (raw)
In-Reply-To: <1232014456.8870.26.camel@laptop>
On Thu, 2009-01-15 at 11:14 +0100, Peter Zijlstra wrote:
> On Thu, 2009-01-15 at 10:28 +0100, Mike Galbraith wrote:
> OK, so why did I write it like that to begin with...
>
> Aah, yes.
>
> Say we've just dequeued current
>
> schedule
> deactivate_task(prev)
> dequeue_entity
> update_min_vruntime
>
> Then we'll set
>
> vruntime = cfs_rq->min_vruntime;
>
> we find !cfs_rq->curr, but do find someone in the tree. Then we _must_
> do vruntime = se->vruntime, because
>
> vruntime = min_vruntime(vruntime := cfs_rq->min_vruntime, se->vruntime)
>
> will not advance vruntime, and cause lags the other way around (which we
> fixed with that initial patch: 1af5f730fc1bf7c62ec9fb2d307206e18bf40a69
> (sched: more accurate min_vruntime accounting).
>
> Which leads me to suggest the following
>
> ---
> diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
> index 8e1352c..f2d2d94 100644
> --- a/kernel/sched_fair.c
> +++ b/kernel/sched_fair.c
> @@ -283,7 +283,7 @@ static void update_min_vruntime(struct cfs_rq
> *cfs_rq)
> struct sched_entity,
> run_node);
>
> - if (vruntime == cfs_rq->min_vruntime)
> + if (!cfs_rq->curr)
> vruntime = se->vruntime;
> else
> vruntime = min_vruntime(vruntime, se->vruntime);
Aha. Yeah, I'll re-test with that instead.
> The below can be split into 3 patches:
>
> - the idle weight change (do we really need that? why?)
I saw idle tasks slamming extremely far. I'll verify, less is more.
-Mike
next prev parent reply other threads:[~2009-01-15 10:30 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-11 10:58 [BUG] How to get real-time priority using idle priority Brian Rogers
2009-01-12 5:09 ` Mike Galbraith
2009-01-12 13:03 ` Mike Galbraith
2009-01-12 13:14 ` Ingo Molnar
2009-01-12 15:23 ` Mike Galbraith
2009-01-12 15:24 ` Ingo Molnar
2009-01-13 1:05 ` Brian Rogers
2009-01-13 2:58 ` Mike Galbraith
2009-01-14 5:13 ` Mike Galbraith
2009-01-14 5:31 ` Ingo Molnar
2009-01-14 6:02 ` Mike Galbraith
2009-01-14 7:35 ` Ingo Molnar
2009-01-15 9:28 ` Mike Galbraith
2009-01-15 10:14 ` Peter Zijlstra
2009-01-15 10:30 ` Mike Galbraith [this message]
2009-01-15 11:37 ` Mike Galbraith
2009-01-15 11:41 ` Peter Zijlstra
2009-01-15 12:54 ` Ingo Molnar
2009-01-15 13:05 ` Peter Zijlstra
2009-01-15 13:15 ` Ingo Molnar
2009-01-15 13:16 ` Peter Zijlstra
2009-01-15 12:07 ` Brian Rogers
2009-01-12 20:46 ` [patch take 2] " Mike Galbraith
2009-01-12 20:50 ` Mike Galbraith
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=1232015423.13856.5.camel@marge.simson.net \
--to=efault@gmx.de \
--cc=a.p.zijlstra@chello.nl \
--cc=brian@xyzw.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/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