mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: "Paweł Sikora" <pluto@agmk.net>
Cc: Robert Hancock <hancockrwd@gmail.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [2.6.36.1] IGB driver handles all ethX interrupts on single cpu core.
Date: Wed, 08 Dec 2010 08:59:25 +0100	[thread overview]
Message-ID: <1291795165.2883.7.camel@edumazet-laptop> (raw)
In-Reply-To: <201012080845.49604.pluto@agmk.net>

Le mercredi 08 décembre 2010 à 08:45 +0100, Paweł Sikora a écrit :
> On Wednesday 08 of December 2010 02:44:25 Robert Hancock wrote:
> > On 12/07/2010 12:06 PM, Paweł Sikora wrote:
> > > hi,
> > >
> > > i'm currently testing a new server with 2x opteron-6128 with dual gigabit port
> > > and observing that the igb driver uses only single core for all ethX interrupts.
> > > is it a correct behaviour for this driver?
> > >
> > > BR,
> > > Pawel.
> > 
> > The CPU affinity for the IRQ isn't really under the driver's control. It 
> > looks like all your interrupts are being handled on CPU0. You likely 
> > need to run the irqbalance daemon.
> 
> ok, so why e.g. on one machine (dual amd opteron) irqbalance daemon is required
> and on second machine (single intel quad-core) irqs are balanced w/o daemon?
> this looks inconsistent to me.
> 
> $ cat /proc/interrupts
>            CPU0       CPU1       CPU2       CPU3
>   0:         49          2          0          0   IO-APIC-edge      timer
>   1:          0          1          0          1   IO-APIC-edge      i8042
>   8:         13         11         12         13   IO-APIC-edge      rtc0
>   9:          0          0          0          0   IO-APIC-fasteoi   acpi
>  12:          0          0          3          1   IO-APIC-edge      i8042
>  16:        224        236        235        232   IO-APIC-fasteoi   pata_marvell, uhci_hcd:usb3
>  17:          0          0          0          0   IO-APIC-fasteoi   saa7133[0], saa7133[0]
>  18:          0          0          0          0   IO-APIC-fasteoi   ehci_hcd:usb1, uhci_hcd:usb5, uhci_hcd:usb8
>  19:        695        672        660        630   IO-APIC-fasteoi   uhci_hcd:usb7
>  21:          0          0          0          0   IO-APIC-fasteoi   uhci_hcd:usb4
>  23:          1          1          1          0   IO-APIC-fasteoi   ehci_hcd:usb2, uhci_hcd:usb6
>  40:       3409       3446       3441       3403   PCI-MSI-edge      ahci
>  41:         63         60         60         61   PCI-MSI-edge      hda_intel
>  42:       3219       3180       3237       3192   PCI-MSI-edge      radeon
>  43:        505        487        496        498   PCI-MSI-edge      eth0


irqbalance is not required.

You can decide yourself of IRQ affinities

Given data you provided :

echo 0f >/proc/irq/*/eth0/../smp_affinity

If your IGB card has 4 queues and you want each queue serviced by a
given cpu :

echo 01 >/proc/irq/*/eth0-fp-0/../smp_affinity
echo 02 >/proc/irq/*/eth0-fp-1/../smp_affinity
echo 04 >/proc/irq/*/eth0-fp-2/../smp_affinity
echo 08 >/proc/irq/*/eth0-fp-3/../smp_affinity

Note 1 : If under load, NAPI is triggered and no anymore hardirqs
are delivered, so load stay on one ksoftirqd (one cpu),
no matter changes you make on /proc/irq/...




  reply	other threads:[~2010-12-08  7:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-07 18:06 Paweł Sikora
2010-12-08  1:44 ` Robert Hancock
2010-12-08  7:45   ` Paweł Sikora
2010-12-08  7:59     ` Eric Dumazet [this message]
2010-12-08 15:22     ` Robert Hancock

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=1291795165.2883.7.camel@edumazet-laptop \
    --to=eric.dumazet@gmail.com \
    --cc=hancockrwd@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pluto@agmk.net \
    /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®