I asked on 2016-06-07 17:19:43 [-0700]:
quoted
cpsw_rx_poll() is called even when there is essentially no network
traffic, so I'm not sure how to tell if NAPI is working as intended.
On Thu, Jun 9, 2016 at 5:37 AM, Sebastian Andrzej Siewior
[off-list ref] wrote:
You should see an invocation of __raise_softirq_irqoff_ksoft() and then
cpsw's poll function should run in "ksoftirqd/" context instead in the
context of the task it runs now.
The attached patch uses a kprobe to detect when Ethernet switches to
NAPI on a Freescale i.MX6 board. Thanks to Sebastian for the
suggestion about the method. As expected, there are no messages when
I ping-flood the board from another host. However, if I also spawn
multiple scp's of large files at the same time, then the messages
appear. I tested with 4.4.4-rt11, but the virtually identical
patch is against 4.1.18-rt17. I'm posting it here in case it's
useful to someone else. It seems to me that if the various IRQs that
can invoke the net_rx_action() are pinned to different cores, that the
use of smp_processor_id() to identify the device that spawns the IRQ
is therefore robust.
The RT scheduling problem we had (namely, system falls over under
ping-flood) was solved by my colleague Brian Silverman, who pinned our
userspace application that ran the critical event loop and adjusted
its priority. Doing so prevented a ping-flood from causing the event
loop to miss cycles.
Thanks again to everyone for your advice, and I hope to meet some of
you in Berlin next month.
-- Alison