netdev.vger.kernel.org archive mirror
 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: Tue, 15 Jan 2013 10:11:14 +0200	[thread overview]
Message-ID: <20130115101114.0a59a7cb@vostro> (raw)
In-Reply-To: <20130109191456.0888ac75@vostro>

On Wed, 9 Jan 2013 19:14:56 +0200 Timo Teras <timo.teras@iki.fi> wrote:

> It seems that the rx_missed is not directly related to traffic amount.
> At times the box is handling easily 10000+ pps, while packet loss can
> happen at other times on 4000-8000pps levels.
> 
> Generally time_squeeze does not happen, and the box is at 20-30%
> softirq. Some times time_squeeze bumps up with one (within a one
> second interval) or two and packet loss does not happen.
> 
> When rx_missed is getting bumped, time_squeeze goes up with 1-3, and
> rx_missed goes up with 50-1000 packets. Usually around 200 packets. (1
> second sampling period)
> 
> I did find a strong correlation that rx_misses happen usually when the
> box has dropped a packet due to iptables DROP/REJECT rule, or some
> other reason (e.g. I'm seeing once in a while dmesg contain:
> "nf_ct_sip: dropping packet").
> 
> Any ideas why a netfilter packet drop might cause netdevice rx to
> stall long enough to saturate the hardware receive queue?

Ok, found the main culprit. Embarassingly, there was LOG targets, which
wound up writing to ttyS0. That apparently is synchronous operation, so
the printk's made the napi poller choke whenever packets got dropped.

However, I do still observe minor packet drops on specific loads.
Increasing the rx fifo size helped noticeably, but even at 512 it still
does some drops. Seems that Realtek's r8168 driver has rx fifo size of
1024.

Would it be feasible to make the fifo size a module parameter, or
somehow autotuned according to available system memory?

I also noticed that since recent commits, the dirty_rx is always
identical cur_rx. Basically, dirty_rx can be just removed. Should I
send a patch for this?

 - Timo

  reply	other threads:[~2013-01-15  8:11 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
2013-01-09 17:14     ` Timo Teras
2013-01-15  8:11       ` Timo Teras [this message]
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=20130115101114.0a59a7cb@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 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).