From: Christoph Lameter <clameter@sgi.com>
To: "Siddha, Suresh B" <suresh.b.siddha@intel.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>,
Ingo Molnar <mingo@elte.hu>,
Peter Williams <pwil3058@bigpond.net.au>,
linux-kernel@vger.kernel.org
Subject: Re: [RFC] sched_tick with interrupts enabled
Date: Thu, 19 Oct 2006 08:50:50 -0700 (PDT) [thread overview]
Message-ID: <Pine.LNX.4.64.0610190736210.7337@schroedinger.engr.sgi.com> (raw)
In-Reply-To: <20061018191900.D26521@unix-os.sc.intel.com>
On Wed, 18 Oct 2006, Siddha, Suresh B wrote:
> On Wed, Oct 18, 2006 at 02:59:07PM -0700, Christoph Lameter wrote:
> > load_balancing has the potential of running for some time if f.e.
> > sched_domains for a system with 1024 processors have to be balanced.
> > We currently do all of that with interrupts disabled. So we may be unable
> > to service interrupts for some time. Most of that time is potentially
> > spend in rebalance_tick.
>
> Did you see an issue because of this or just theoretical?
Yes we actually had some livelocks when things got really busy and even
missed timer interrupts. We have another workaround by enabling/disabling
interrupts in the timer tick on IA64 now but it would be good
to address this issue in a general way.
> > +static void rebalance_tick(unsigned long dummy)
> > {
> > + int this_cpu = smp_processor_id();
> > + struct rq *this_rq = cpu_rq(this_cpu);
> > + enum idle_type idle;
> > unsigned long this_load, interval, j = cpu_offset(this_cpu);
> > struct sched_domain *sd;
> > int i, scale;
> >
> > + idle = (current == this_rq->idle) ? SCHED_IDLE : NOT_IDLE;
>
> We need to add nr_running check too, to determine if we want to do
> idle/not-idle balancing. This is in the context of wake_priority_sleeper()
Ok. Thanks. Would this work?
Index: linux-2.6.19-rc2-mm1/kernel/sched.c
===================================================================
--- linux-2.6.19-rc2-mm1.orig/kernel/sched.c 2006-10-19 09:39:08.000000000 -0500
+++ linux-2.6.19-rc2-mm1/kernel/sched.c 2006-10-19 09:42:10.733631242 -0500
@@ -2846,7 +2846,8 @@ static void rebalance_tick(unsigned long
struct sched_domain *sd;
int i, scale;
- idle = (current == this_rq->idle) ? SCHED_IDLE : NOT_IDLE;
+ idle = (current == this_rq->idle && !this_rq->nr_running) ?
+ SCHED_IDLE : NOT_IDLE;
this_load = this_rq->raw_weighted_load;
/* Update our load: */
next prev parent reply other threads:[~2006-10-19 15:51 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-18 17:04 Christoph Lameter
2006-10-18 17:21 ` Nick Piggin
2006-10-18 18:01 ` Christoph Lameter
2006-10-18 18:09 ` Nick Piggin
2006-10-18 18:48 ` Christoph Lameter
2006-10-18 19:14 ` Nick Piggin
2006-10-18 21:59 ` Christoph Lameter
2006-10-19 2:19 ` Siddha, Suresh B
2006-10-19 10:16 ` KAMEZAWA Hiroyuki
2006-10-19 15:50 ` Christoph Lameter [this message]
2006-10-19 20:40 ` Siddha, Suresh B
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=Pine.LNX.4.64.0610190736210.7337@schroedinger.engr.sgi.com \
--to=clameter@sgi.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 \
/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®