mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: Peter Williams <pwil3058@bigpond.net.au>
Cc: Ingo Molnar <mingo@elte.hu>, Mike Galbraith <efault@gmx.de>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: sched: Am I missing something?
Date: Mon, 21 Sep 2009 15:53:03 +0200	[thread overview]
Message-ID: <1253541183.8439.168.camel@twins> (raw)
In-Reply-To: <4AB77E21.6020805@bigpond.net.au>

On Mon, 2009-09-21 at 23:22 +1000, Peter Williams wrote:
> Or is the line:
> 
> 	p->prio = effective_prio(p);
> 
> in wake_up_new_task() an expensive no op.
> 
> As far as I can tell from reading the code, it will always be the case 
> that EITHER rt_prio(p->prio) is true OR p->prio == p->normal_prio when 
> this call is made and, in either case, the value of p->prio will be 
> unchanged.  In addition, when this call is made p->normal_prio is 
> already equal to to normal_prio(p), so the side effects of the function 
> (setting p->normal_prio) are also unnecessary.
> 
> Am I correct or have I missed something?

Yuck @ all that prio code..

I think you're right,  sched_fork() resets the prio, so poking at it in
wake_up_new_task() seems superfluous.

I've been meaning to re-write most of the PI code one of these days, but
so far I've not had time to.

My initial goal is to replace plist with a rb-tree and fix some of the
boost paths to be inside the scheduler. That is, we currently have the
fun situation that we boost a lock owner, which becomes runnable, gets
pushed to another cpu, then current blocks and reschedules, leaving this
cpu to again sort out work.

It would be much easier if we'd first dequeue current, then boost and
then select the owner. Saves a bit of bouncing around.

The rb-tree is needed for things like PI on CFS (yes, you can do a form
of PI on proportional schedulers), and we're going to look at doing a
full sporadic task model deadline scheduler, which needs both deadline
inheritance and bandwidth inheritance.




  reply	other threads:[~2009-09-21 13:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-21 13:22 Peter Williams
2009-09-21 13:53 ` Peter Zijlstra [this message]
2009-09-21 23:53   ` Peter Williams
2009-09-23 14:36   ` Peter Williams

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=1253541183.8439.168.camel@twins \
    --to=a.p.zijlstra@chello.nl \
    --cc=efault@gmx.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=pwil3058@bigpond.net.au \
    /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

all inboxes | Powered by JetHome®