public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Darren Hart <dvhltc@us.ibm.com>
Cc: linux-kernel@vger.kernel.org,
	Thomas Gleixner <tglx@linutronix.de>,
	"Stultz, John" <johnstul@us.ibm.com>,
	Peter Williams <pwil3058@bigpond.net.au>,
	"Siddha, Suresh B" <suresh.b.siddha@intel.com>,
	Nick Piggin <nickpiggin@yahoo.com.au>
Subject: Re: RT task scheduling
Date: Sun, 9 Apr 2006 20:31:21 +0200	[thread overview]
Message-ID: <20060409183121.GA29851@elte.hu> (raw)
In-Reply-To: <200604091025.17518.dvhltc@us.ibm.com>


* Darren Hart <dvhltc@us.ibm.com> wrote:

> > -rt14 tree with this bug fixed - does it fix the failures for you?
> 
> I ran the test 100 times, no failures!  Looks good to me.
> 
> # for ((i=0;i<100;i++)); do ./sched_football 4 10 | grep "Final ball position" 
> | tee sched_football_ball.log; sleep 1; done
> Final ball position: 0
> ...
> Final ball position: 0

cool!

> Looking at the patch, it looks like the problem was a race on the 
> runqueue lock - when we called double_runqueue_lock(a,b) we risked 
> dropping the lock on b, giving another CPU opportunity to grab it and 
> pull our next task.  The API change to double_runqueue_lock() and 
> checking the new return code in balance_rt_tasks() is what fixed the 
> issue.  Is that accurate?

this was one problem, yes. There was another problem too: the code 
checked against rq->curr, while it has to consider the 'next' task (the 
current task might just be about to leave the CPU at the point we do the 
rebalancing). (A third problem was an efficiency issue: the code 
indiscriminately pulled all RT tasks it found eligible - while it should 
only have pulled ones that preempt the next CPU.)

> I was doing some testing to see why the RT tasks don't appear to be 
> evenly distributed across the CPUs (in my earlier post using the 
> output of /proc/stat). [...]

could you explain this in a bit more detailed way? [what is the behavior 
you observe, and what would be your expectation.]

> [...] I was wondering if the load_balancing code might be interfering 
> with the balance_rt_tasks() code.  Should the normal load_balancer 
> even touch RT tasks in the presence of balance_rt_tasks() ?  I'm 
> thinking not.

if there is RT overload then running the highest-prio RT tasks trumps 
any other consideration - including load_balance(). Also, same-prio 
SCHED_FIFO tasks can starve each other indefinitely, so there's not much 
the load-balancer can do.

	Ingo

      reply	other threads:[~2006-04-09 18:33 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-06  3:25 RT task scheduling Darren Hart
2006-04-06  4:19 ` Peter Williams
2006-04-06 17:24   ` Darren Hart
2006-04-06 23:02     ` Peter Williams
2006-04-06  7:37 ` Ingo Molnar
2006-04-06 14:55   ` Darren Hart
2006-04-06 18:16   ` Darren Hart
2006-04-06 22:35     ` Darren Hart
2006-04-07 22:58       ` Vernon Mauery
2006-04-06 23:06   ` Peter Williams
2006-04-07  3:07   ` Bill Huey
2006-04-07  7:11     ` Ingo Molnar
2006-04-07  8:39       ` Bill Huey
2006-04-07  9:11         ` Bill Huey
2006-04-07  9:19         ` Ingo Molnar
2006-04-07 10:39           ` Bill Huey
2006-04-07 10:51             ` Ingo Molnar
2006-04-07 11:14               ` Bill Huey
2006-04-07 11:29                 ` Ingo Molnar
2006-04-07 22:18                   ` Bill Huey
2006-04-07 14:56             ` Darren Hart
2006-04-07 21:06               ` Bill Huey
2006-04-07 22:37                 ` Darren Hart
2006-04-07 23:36                   ` Bill Huey
2006-04-08  3:01                     ` Steven Rostedt
2006-04-08  4:28                       ` Vernon Mauery
2006-04-08  4:45                         ` Steven Rostedt
2006-04-08  7:16                 ` Ingo Molnar
2006-04-08  7:25                   ` Ingo Molnar
2006-04-08  7:54                     ` Bill Huey
2006-04-08  8:03                       ` Ingo Molnar
2006-04-08 10:02                         ` Bill Huey
2006-04-08  0:11   ` Peter Williams
2006-04-07  9:23 ` Bill Huey
2006-04-09 13:16 ` Ingo Molnar
2006-04-09 17:25   ` Darren Hart
2006-04-09 18:31     ` Ingo Molnar [this message]

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=20060409183121.GA29851@elte.hu \
    --to=mingo@elte.hu \
    --cc=dvhltc@us.ibm.com \
    --cc=johnstul@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nickpiggin@yahoo.com.au \
    --cc=pwil3058@bigpond.net.au \
    --cc=suresh.b.siddha@intel.com \
    --cc=tglx@linutronix.de \
    /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