mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Mattis Lorentzon <Mattis.Lorentzon@autoliv.com>,
	Fabio Estevam <festevam@gmail.com>
Cc: Fredrik Noring <fredrik.noring@autoliv.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: Oops: 17 SMP ARM (v3.16-rc2)
Date: Fri, 22 Aug 2014 09:27:29 +0100	[thread overview]
Message-ID: <20140822082728.GN30401@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <C4A61A5CA4AD2246942F4BA6F20ACB80435776D3@ALVA-EXMB04.alv.autoliv.int>

On Thu, Aug 14, 2014 at 02:43:56PM +0000, Mattis Lorentzon wrote:
> Fabio and Russell,
> 
> > A working theory is that the switch (3Com Switch 4400) triggers the
> > degeneration of the network stack from which Linux does not seem to
> > recover, even if we later bypass the switch and directly connect the board to
> > the server machine.
> 
> After a few more tests we have finally been able to trigger the exact
> same stalls on the Sabrelite board with a direct network connection
> (i.e. without the switch).

That's a setup which I can't reproduce, as all my MX6 hardware runs
root-NFS, so using a direct connection to a machine to test will
result in the MX6 losing its root filesystem.

That said, on SolidRun hardware, there is some investigation going on
at the moment concerning poor UDP performance - this is an on-going
problem that has been present for a long time.

What we find is that TCP performance achieves around the 600mbps mark,
but UDP performance can be extremely poor with high packet loss.
Adding a udelay(210) into the fec_enet_rx() can perversely (on
multi-core SoCs) increase UDP performance to around 500mbps at the
expense of a reduction in TCP performance.

This "solution" was tripped over while trying to debug this problem,
and it was found that adding printk()s to the driver increased UDP
performance - so subsituting udelay() for printk() was then tried.

I tried to run perf on the kernel yesterday to find out what's going
on, but for some reason, perf gave me impossible call traces, so I
gave up with that idea.  For example, perf told me that there was a
high hit rate in memcpy() being called from net_rx_action(), but
net_rx_action() doesn't call memcpy(), nor do any of the called
functions as a tail-call.

That said, I don't think perf could tell us what's going on - what
we need is a trace of the CPU's execution while iperf is running,
*without* affecting the CPU itself.  This is something I can't do
with the hardware I have.

My suspicion (unproven) is that a batch of packets get processed in
the softirq handler called during the FEC interrupt exit path.  Then,
because there's more work to be done, ksoftirqd is scheduled, but it
takes time for ksoftirqd to start running - during which time we drop
a lot of packets.  ksoftirqd processes some packets, but then finds
that it can't complete the NAPI "work budget", and so stops running,
resulting in the packet processing being triggered by the next FEC
interrupt, and the cycle repeats.

TCP notices this, and adjusts its sending rate to match, whereas UDP
just carries on regardless, resulting in lots of packets dropped each
time we switch from the tail of hardirq processing to ksoftirqd.

With the udelay() in place, processing takes enough time that it gets
bounced onto ksoftirqd, where it stays.

I'm adding this to this thread in case it has any bearing on the
problem(s) you're seeing - yes, it seems like a different problem, but
could it be related...

-- 
FTTC broadband for 0.8mile line: currently at 9.5Mbps down 400kbps up
according to speedtest.net.

  parent reply	other threads:[~2014-08-22  8:27 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-25 13:55 Mattis Lorentzon
2014-06-26 14:01 ` Russell King - ARM Linux
2014-06-26 14:44   ` Mattis Lorentzon
2014-06-26 15:14     ` Russell King - ARM Linux
2014-06-27 11:21       ` Russell King - ARM Linux
2014-06-27 16:16         ` Fredrik Noring
2014-06-27 16:31           ` Russell King - ARM Linux
2014-06-30  6:22             ` Fredrik Noring
2014-06-30 12:30             ` Fredrik Noring
2014-06-30 13:00               ` Nathan Lynch
2014-07-02  6:02             ` Fredrik Noring
2014-08-05 13:31             ` Mattis Lorentzon
2014-08-05 13:53               ` Fabio Estevam
2014-08-06  6:48                 ` Mattis Lorentzon
2014-08-06  9:50               ` Russell King - ARM Linux
2014-08-06 11:10                 ` Mattis Lorentzon
2014-08-06 12:55                   ` Russell King - ARM Linux
2014-08-07 11:11                     ` Mattis Lorentzon
2014-08-07 12:12                       ` Russell King - ARM Linux
2014-08-07 14:20                         ` Fabio Estevam
2014-08-07 14:38                           ` Fabio Estevam
2014-08-08  1:30                             ` Troy Kisky
2014-08-08 14:05                           ` Fabio Estevam
2014-08-08 18:09                         ` Russell King - ARM Linux
2014-08-11 13:32                           ` Mattis Lorentzon
2014-08-11 17:41                             ` Fabio Estevam
2014-08-13 13:39                               ` Mattis Lorentzon
2014-08-25 10:18                                 ` Russell King - ARM Linux
2014-08-26 13:11                                   ` Iain Paton
2014-08-14 14:43                               ` Mattis Lorentzon
2014-08-14 15:30                                 ` Fabio Estevam
2014-08-15  5:42                                   ` Mattis Lorentzon
2014-08-17 21:34                                     ` Iain Paton
2014-08-17 21:46                                       ` Fabio Estevam
2014-08-19  6:03                                         ` Iain Paton
2014-08-21  9:39                                           ` Iain Paton
2014-08-22  0:01                                             ` Fabio Estevam
2014-08-22  6:39                                               ` Mattis Lorentzon
2014-08-22 10:36                                               ` Iain Paton
2014-08-27  6:32                                                 ` Mattis Lorentzon
2014-08-27 10:43                                                   ` Iain Paton
2014-08-29 10:57                                                     ` Mattis Lorentzon
2014-08-29 11:30                                                       ` Fabio Estevam
2014-12-16 14:50                                                       ` Mattis Lorentzon
2014-08-26 13:12                                             ` Iain Paton
2014-08-22  8:27                                 ` Russell King - ARM Linux [this message]
2014-06-26 13:16 Mattis Lorentzon

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=20140822082728.GN30401@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=Mattis.Lorentzon@autoliv.com \
    --cc=festevam@gmail.com \
    --cc=fredrik.noring@autoliv.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®