From: Eric Dumazet <eric.dumazet@gmail.com>
To: John Ousterhout <ouster@cs.stanford.edu>, netdev@vger.kernel.org
Subject: Re: BUG: sk_backlog.len can overestimate
Date: Mon, 30 Sep 2019 17:14:57 -0700 [thread overview]
Message-ID: <01ac3ff4-4c06-7a6c-13fc-29ca9ed3ad88@gmail.com> (raw)
In-Reply-To: <CAGXJAmz5izfnamHA3Y_hU-AT1CX5K2MN=6BPjRXXcTCWvPeWng@mail.gmail.com>
On 9/30/19 4:58 PM, John Ousterhout wrote:
> As of 4.16.10, it appears to me that sk->sk_backlog_len does not
> provide an accurate estimate of backlog length; this reduces the
> usefulness of the "limit" argument to sk_add_backlog.
>
> The problem is that, under heavy load, sk->sk_backlog_len can grow
> arbitrarily large, even though the actual amount of data in the
> backlog is small. This happens because __release_sock doesn't reset
> the backlog length until it gets completely caught up. Under heavy
> load, new packets can be arriving continuously into the backlog
> (which increases sk_backlog.len) while other packets are being
> serviced. This can go on forever, so sk_backlog.len never gets reset
> and it can become arbitrarily large.
Certainly not.
It can not grow arbitrarily large, unless a backport gone wrong maybe.
>
> Because of this, the "limit" argument to sk_add_backlog may not be
> useful, since it could result in packets being discarded even though
> the backlog is not very large.
>
You will have to study git log/history for the details, the limit _is_ useful,
and we reset the limit in __release_sock() only when _safe_.
Assuming you talk about TCP, then I suggest you use a more recent kernel.
linux-5.0 got coalescing in the backlog queue, which helped quite a bit.
next prev parent reply other threads:[~2019-10-01 0:15 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAGXJAmwQw1ohc48NfAvMyNDpDgHGkdVO89Jo8B0j0TuMr7wLpA@mail.gmail.com>
2019-09-30 23:58 ` BUG: sk_backlog.len can overestimate John Ousterhout
2019-10-01 0:14 ` Eric Dumazet [this message]
2019-10-01 15:44 ` John Ousterhout
[not found] ` <CAGXJAmxmJ-Vm379N4nbjXeQCAgY9ur53wmr0HZy23dQ_t++r-Q@mail.gmail.com>
[not found] ` <f4520c32-3133-fb3b-034e-d492d40eb066@gmail.com>
2019-10-01 15:46 ` Fwd: " John Ousterhout
2019-10-01 15:48 ` John Ousterhout
2019-10-01 16:19 ` Eric Dumazet
2019-10-01 17:25 ` John Ousterhout
2019-10-01 18:34 ` Eric Dumazet
2019-10-01 20:45 ` John Ousterhout
2019-10-01 20:53 ` Eric Dumazet
2019-10-01 23:01 ` John Ousterhout
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=01ac3ff4-4c06-7a6c-13fc-29ca9ed3ad88@gmail.com \
--to=eric.dumazet@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=ouster@cs.stanford.edu \
/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).