public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Martin Bligh <mbligh@google.com>
To: "Theodore Ts'o" <tytso@mit.edu>
Cc: Lee Revell <rlrevell@joe-job.com>,
	"Robert M. Stockmann" <stock@stokkie.net>,
	linux-kernel@vger.kernel.org, Randy Dunlap <rddunlap@osdl.org>,
	Linus Torvalds <torvalds@osdl.org>, Andrew Morton <akpm@osdl.org>,
	Andre Hedrick <andre@linux-ide.org>,
	Manfred Spraul <manfreds@colorfullife.com>,
	Alan Cox <alan@redhat.com>, Kamal Deen <kamal@kdeen.net>
Subject: Re: irqbalance mandatory on SMP kernels?
Date: Tue, 18 Apr 2006 10:53:10 -0700	[thread overview]
Message-ID: <44452786.1010303@google.com> (raw)
In-Reply-To: <20060418163539.GB10933@thunk.org>

Theodore Ts'o wrote:
> On Mon, Apr 17, 2006 at 11:01:33AM -0400, Lee Revell wrote:
> 
>>>There is an in-kernel IRQ balancer. Redhat just choose to turn it
>>>off, and do it in userspace instead. You can re-enable it if you
>>>compile your own kernel.
>>
>>Round-robin IRQ balancing is inefficient anyway.  You'd get better cache
>>utilization letting one CPU take them all.
> 
> 
> IIRC, Van Jacobsen at his Linux.conf.au presentation made a pretty
> strong argument that irq balancing was never a good idea, describing
> them as a George Bush-like policy.  "Ooh, interrupts are hurting one
> CPU --- let's hurt them **all** and trash everybody's cache!"

Nothing nowadays does round-robin of interrupts, either the in-kernel
or userspace balancers ... but we do migrate them occasionally (in the
order of 1s or so)

> Which brings up an interesting question --- why do we have an IRQ
> balancer in the kernel at all?  Maybe the scheduler's load balancer
> should take this into account so that processes that have the
> misfortune of getting assigned to the wrong CPU don't get hurt too
> badly (or maybe if we have enough cores/CPU's we can afford to
> dedicate one or two CPU's to doing nothing but handling interrupts);
> but spreading IRQ's across all of the CPU's doesn't seem like it's
> ever the right answer.

Because *something* has to be balanced, and moving processes around
is expensive too. Personally I find the process model cleaner, but
maybe it's less efficient - you'd also add extra overhead for accounting
to each interrupt, which we don't do now.

I'm not claiming that moving irqs is worse or better than moving
processes - just that it's a tradeoff, both suck. Perhaps the
real answer is that we shouldn't be getting that many interrupts
anyway - technologies like NAPI and simpler device interrupt collation
should reduce the load, and most of the work should be done in the
back-ends anyhow (though those are often locally bonded to the CPU
the irq arrived on).

M.

  parent reply	other threads:[~2006-04-18 17:54 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-17 13:00 irqbalance mandatory on SMP kernels? Robert M. Stockmann
2006-04-17 13:10 ` Arjan van de Ven
2006-04-17 14:15   ` Robert M. Stockmann
2006-04-17 14:23     ` Arjan van de Ven
2006-04-17 14:31 ` Martin J. Bligh
2006-04-17 15:01   ` Lee Revell
2006-04-18 16:35     ` Theodore Ts'o
2006-04-18 17:42       ` Stephen Hemminger
2006-04-18 17:53       ` Martin Bligh [this message]
2006-04-18 18:19       ` Arjan van de Ven
2006-04-19 12:42         ` Erik Mouw
2006-04-19 14:23           ` Arjan van de Ven
2006-04-19 14:38             ` Theodore Ts'o
2006-04-19 14:45               ` Arjan van de Ven
2006-04-20  7:43                 ` Nick Piggin
2006-04-19 14:30           ` Martin J. Bligh

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=44452786.1010303@google.com \
    --to=mbligh@google.com \
    --cc=akpm@osdl.org \
    --cc=alan@redhat.com \
    --cc=andre@linux-ide.org \
    --cc=kamal@kdeen.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=manfreds@colorfullife.com \
    --cc=rddunlap@osdl.org \
    --cc=rlrevell@joe-job.com \
    --cc=stock@stokkie.net \
    --cc=torvalds@osdl.org \
    --cc=tytso@mit.edu \
    /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