From: gmate.amit@gmail.com (Kumar amit mehta)
To: kernelnewbies@lists.kernelnewbies.org
Subject: relationship between cpu_affinity and Packet RX Processing
Date: Fri, 29 Mar 2013 06:19:08 -0700 [thread overview]
Message-ID: <20130329131907.GA3199@gmail.com> (raw)
In-Reply-To: <CAKoUAr=ACxPJ6Dysct4GFdN4TgG_Dvhfi93gJoAzRzv9cZho8g@mail.gmail.com>
On Tue, Mar 26, 2013 at 09:31:01PM +0200, Rami Rosen wrote:
> Hi,
>
> 1) You can be sure that it does not use more than one rx queue.
>
> You can find more info about RX queues in
> http://media.wix.com/ugd//295986_4ef6dbdf11fd0a7f74f09741b4b5b2ee.pdf
>
> (I wrote it, a shameless plug...)
>
> 2) Does the irqbalance service, which is common in some distros, is
> running ? can you try to disable it and run traffic again and check
> /proc/interrupts afrer some time ?
>
> 3) regardless of 2 (meaning not stopping irqbalance if it was active)
> can you please try "taskset 02 ping www.google.com" and tell us
> whether interrupts were incremented on the second CPU ? (please send
> /proc/interrupts | grep eth0 before and after sending, let's say, 5
> pings)?
>
My apologies for responding after a long time. I lost access to the machine on
which this VM was running. Now running this VM on my laptop, which seem to have
similar hardware configuration. Please find the details, which you had asked for
below:(comment in quotes)
amit at ubuntu:~$ cat /proc/cpuinfo |grep processor
processor : 0
processor : 1
"2 CPU"
amit at ubuntu:~$ cat /proc/interrupts |egrep 'CPU|eth0'
CPU0 CPU1
19: 7887 31 IO-APIC-fasteoi eth0
amit at ubuntu:~$ ls -lah /sys/class/net/eth0/device/driver
lrwxrwxrwx 1 root root 0 Mar 29 01:13 /sys/class/net/eth0/device/driver ->
../../../../bus/pci/drivers/pcnet32
amit at ubuntu:~$ lsmod|grep -i pcnet32
pcnet32 40671 0
"driver"
amit at ubuntu:~$ ls /sys/class/net/eth0/queues
rx-0 tx-0
"just one rx-queue"
amit at ubuntu:~$ sudo cat /proc/irq/19/smp_affinity
01
"tied to CPU0"
"disabling irqbalance"
amit at ubuntu:~$ status irqbalance
irqbalance start/running, process 1016
amit at ubuntu:~$ sudo stop irqbalance
irqbalance stop/waiting
amit at ubuntu:~$ taskset 02 ping www.google.com
"after sometime"
amit at ubuntu:~$ cat /proc/interrupts |egrep 'CPU|eth0'
CPU0 CPU1
19: 8046 31 IO-APIC-fasteoi eth0
"No increase in interrupt counts on CPU1"
"Now lets use both CPUs"
root at ubuntu:/home/amit# echo "3" >/proc/irq/19/smp_affinity
root at ubuntu:/home/amit# cat /proc/irq/19/smp_affinity
03
"As before, start ping and expecting both CPUs to be used"
amit at ubuntu:~$ taskset 02 ping www.google.com
root at ubuntu:/home/amit# cat /proc/interrupts |egrep 'CPU|eth0'
CPU0 CPU1
19: 9001 71 IO-APIC-fasteoi eth0
^^^^
and yes, indeed..
So multiple Rx queues seem to have nothing to do with CPU affinity, as in this
case I have a driver implementing a single Rx queue and I see that the rx packet
processing happens through both of the CPUs.
-Amit
next prev parent reply other threads:[~2013-03-29 13:19 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-26 18:31 relationship between cpu_affinity and Packet RX Processing Kumar amit mehta
2013-03-26 18:35 ` Rami Rosen
2013-03-26 19:05 ` Kumar amit mehta
2013-03-26 19:31 ` Rami Rosen
2013-03-29 13:19 ` Kumar amit mehta [this message]
2013-03-29 13:36 ` Kumar amit mehta
2013-03-30 8:16 ` Rami Rosen
2013-03-30 21:56 ` Paulo Petruzalek
2013-03-26 18:45 ` Arlie Stephens
2013-03-26 18:54 ` Kumar amit mehta
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=20130329131907.GA3199@gmail.com \
--to=gmate.amit@gmail.com \
--cc=kernelnewbies@lists.kernelnewbies.org \
/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).