public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Martin J. Bligh" <mbligh@mbligh.org>
To: Erik Mouw <erik@harddisk-recovery.com>
Cc: Arjan van de Ven <arjan@infradead.org>,
	"Theodore Ts'o" <tytso@mit.edu>,
	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: Wed, 19 Apr 2006 07:30:37 -0700	[thread overview]
Message-ID: <4446498D.1080306@mbligh.org> (raw)
In-Reply-To: <20060419124210.GB24807@harddisk-recovery.com>

Erik Mouw wrote:
> On Tue, Apr 18, 2006 at 08:19:17PM +0200, Arjan van de Ven wrote:
> 
>>>but spreading IRQ's across all of the CPU's doesn't seem like it's
>>>ever the right answer.
>>
>>well it is in some cases, imagine having 2 cpus and 2 gige nics that are
>>very busy doing webserving. That's an obvious case where 1-nic-per-cpu
>>ends up doing the right thing... the way it ends up is that each nic has
>>a full cpu for itself and it's own apaches... almost fully independent
>>of the other one. Now if you moved both irqs to the same cpu, the
>>apaches would follow, because if they didn't then you'd be bouncing
>>their data *all the time*. And at that point the other cpu will become
>>bored ;)
> 
> 
> So what happens with a dual amd64 system where each CPU has its "own"
> NIC? Something like this:
> 
> 
> MEM0 <--> CPU0 <--- HT ---> CPU1 <--> MEM1
>            ^                 ^
>            |                 |
>            HT                HT
>            |                 |
>            v                 v
>       PCI bridge0      PCI1 bridge
>            ^                 ^
>            |                 |
>           PCI               PCI
>            |                 |
>            v                 v
>        GigE NIC0         GigE NIC1
> 
> The "best" approach would be to run an Apache on each CPU using local
> memory and NIC and having the IRQs handled by the local CPU. Does the
> irq balancer allow such a configuraion, or would it be hamperd by the
> process scheduler deciding to run both Apaches on a single CPU?

The trouble is that we're not smart enough to redirect receiving traffic
back to the correct CPU, I think. You'd need to configure different IP
addrs on the same subnet to each NIC, and have intelligent bonding for
outbound traffic.

Then you'd need NUMA locality of IRQs, by bonding them to their closest
CPUs, which is something that's easily done inside the kernel, but is
harder in userspace. but I'm not getting into that silly pissing contest
again. Either mechanism *could* do it. It's just about creating sensbile
APIs and defaults, both of which we're not good at doing as a community.

M.

      parent reply	other threads:[~2006-04-19 14:30 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
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 [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=4446498D.1080306@mbligh.org \
    --to=mbligh@mbligh.org \
    --cc=akpm@osdl.org \
    --cc=alan@redhat.com \
    --cc=andre@linux-ide.org \
    --cc=arjan@infradead.org \
    --cc=erik@harddisk-recovery.com \
    --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