All of lore.kernel.org
 help / color / mirror / Atom feed
From: Timo Teras <timo.teras@iki.fi>
To: Francois Romieu <romieu@fr.zoreil.com>
Cc: netdev@vger.kernel.org
Subject: Re: r8169 rx_missed increasing in bursts (regression)
Date: Wed, 9 Jan 2013 11:58:50 +0200	[thread overview]
Message-ID: <20130109115850.055b7a7e@vostro> (raw)
In-Reply-To: <20130108225833.GA4193@electric-eye.fr.zoreil.com>

On Tue, 8 Jan 2013 23:58:33 +0100 Francois Romieu
<romieu@fr.zoreil.com> wrote:

> Timo Teras <timo.teras@iki.fi> :
> [...]
> > My current hypothesis is that due to high softirq and recent(ish)
> > commit da78dbf "r8169: remove work from irq handler" moving more
> > work to softirq makes the receive path now suffer from latency from
> > getting irq to reading packets from the NIC on these boxes. And
> > that at times the rx fifo can get full causing a missed packet or
> > so.
> 
> This hypothesis won't explain the regression in 3.3.8 since 3.3.x does
> not include commit da78dbf.
> 
> Do you notice any netdev watchdog message in dmesg ?

In production boxes. No.

The lab environment where we tried to reproduce this, we received:
NOHZ: local_softirq_pending 08

Which is likely related, but separate issue. And fixed by commit
da78dbf. So seems that just got upgraded to "regression fix".

> 'perf top' may exhibit something unusual too.

Will try this.

I did notice that:
/proc/net/softnet_stat's 3rd field aka. softnet_data.time_squeeze keeps
incrementing when ever rx_missed increases. Sometiems time_squeeze
increments on it own. But rx_missed never increases without time_squeeze
bumping up seriously too.

> > This might be further escalated by the bug fixed in commit 7dbb491
> > "r8169: avoid NAPI scheduling delay" (which is not present in
> > -stable trees).
> 
> Right, it would had been worth adding to -stable.
> 
> However it only 1) is a problem for 3.4.x (fixed in 3.5) and 2)
> triggers when returning from the slow work thread - which should not
> be used much.

Ok. Didn't realize 3.3.x did not include it. So something else is broke
too.

The slow thread handles the RxOverflow, and in rx_missed case is taken
relatively often. Maybe add a printk there.

> [...]
> > So would it be sensible to do something like:
> > -#define NUM_RX_DESC    256     /* Number of Rx descriptor
> > registers */ +#define NUM_RX_DESC    512     /* Number of Rx
> > descriptor registers */
> 
> You can try it but it may actually increase the amount of heavy work
> done in softirq.

Ok. Will try this and some other things along with added debug logging.

  reply	other threads:[~2013-01-09  9:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-08  8:28 r8169 rx_missed increasing in bursts (regression) Timo Teras
2013-01-08 22:58 ` Francois Romieu
2013-01-09  9:58   ` Timo Teras [this message]
2013-01-09 17:14     ` Timo Teras
2013-01-15  8:11       ` Timo Teras
2013-01-15 22:53         ` Francois Romieu
2013-01-16  7:01           ` [PATCH] r8169: remove unneeded dirty_rx index Timo Teräs
2013-01-16 21:25             ` David Miller
2013-01-16 21:26               ` Francois Romieu
2013-01-16 22:16             ` Francois Romieu
2013-01-16 23:02               ` David Miller

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=20130109115850.055b7a7e@vostro \
    --to=timo.teras@iki.fi \
    --cc=netdev@vger.kernel.org \
    --cc=romieu@fr.zoreil.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.