linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Darren Hart <darren@dvhart.com>
To: Peter Williams <pwil3058@bigpond.net.au>
Cc: linux-kernel@vger.kernel.org, Ingo Molnar <mingo@elte.hu>,
	Thomas Gleixner <tglx@linutronix.de>,
	"Stultz, John" <johnstul@us.ibm.com>,
	"Siddha, Suresh B" <suresh.b.siddha@intel.com>,
	Nick Piggin <nickpiggin@yahoo.com.au>
Subject: Re: RT task scheduling
Date: Thu, 6 Apr 2006 10:24:34 -0700	[thread overview]
Message-ID: <200604061024.35300.darren@dvhart.com> (raw)
In-Reply-To: <443496CA.6050905@bigpond.net.au>

On Wednesday 05 April 2006 21:19, Peter Williams wrote:
> Darren Hart wrote:
> > My last mail specifically addresses preempt-rt, but I'd like to know
> > people's thoughts regarding this issue in the mainline kernel.  Please
> > see my previous post "realtime-preempt scheduling - rt_overload behavior"
> > for a testcase that produces unpredictable scheduling results.
> >
> > Part of the issue here is to define what we consider "correct behavior"
> > for SCHED_FIFO realtime tasks.  Do we (A) need to strive for "strict
> > realtime priority scheduling" where the NR_CPUS highest priority runnable
> > SCHED_FIFO tasks are _always_ running?  Or do we (B) take the best effort
> > approach with an upper limit RT priority imbalances, where an imbalance
> > may occur (say at wakeup or exit) but will be remedied within 1 tick. 
> > The smpnice patches improve load balancing, but don't provide (A).
> >
> > More details in the previous mail...
>
> I'm currently researching some ideas to improve smpnice that may help in
> this situation.  The basic idea is that as well as trying to equally
> distribute the weighted load among the groups/queues we should also try
> to achieve equal "average load per task" for each group/queue.  (As well
> as helping with problems such as yours, this will help to restore the
> "equal distribution of nr_running" amongst groups/queues aim that is
> implicit without smpnice due to the fact that load is just a smoothed
> version of nr_running.)

Can you elaborate on what you mean by "average load per task" ?  

Also, since smpnice is (correct me if I am wrong) load_balancing, I don't 
think it will prevent the problem from happening, but rather fix it when it 
does.  If we want to prevent it from happening, I think we need to do 
something like the rt_overload code from the RT patchset.

>
> In find_busiest_group(), I think that load balancing in the case where
> *imbalance is greater than busiest_load_per_task will tend towards this
> result and also when *imbalance is less than busiest_load_per_task AND
> busiest_load_per_task is less than this_load_per_task.  However, in the
> case where *imbalance is less than busiest_load_per_task AND
> busiest_load_per_task is greater than this_load_per_task this will not
> be the case as the amount of load moved from "busiest" to "this" will be
> less than or equal to busiest_load_per_task and this will actually
> increase the value of busiest_load_per_task.  So, although it will
> achieve the aim of equally distributing the weighted load, it won't help
> the second aim of equal "average load per task" values for groups/queues.
>
> The obvious way to fix this problem is to alter the code so that more
> than busiest_load_per_task is moved from "busiest" to "this" in these
> cases while at the same time ensuring that the imbalance between their
> loads doesn't get any bigger.  I'm working on a patch along these lines.
>
> Changes to find_idlest_group() and try_to_wake_up() taking into account
> the "average load per task" on the candidate queues/groups as well as
> their weighted loads may also help and I'll be looking at them as well.
>   It's not immediately obvious to me how this can be done so any ideas
> would be welcome.  It will likely involve taking the load weight of the
> waking task into account as well.
>
> Peter

  reply	other threads:[~2006-04-06 17:24 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 [this message]
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

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=200604061024.35300.darren@dvhart.com \
    --to=darren@dvhart.com \
    --cc=johnstul@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --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;
as well as URLs for NNTP newsgroup(s).