All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Tonghao Zhang <xiangxia.m.yue@gmail.com>,
	Eric Dumazet <edumazet@google.com>
Cc: Linux Kernel Network Developers <netdev@vger.kernel.org>
Subject: Re: Compare length of req sock queue with sk_max_ack_backlog
Date: Thu, 01 Feb 2018 06:00:07 -0800	[thread overview]
Message-ID: <1517493607.3715.117.camel@gmail.com> (raw)
In-Reply-To: <CAMDZJNWq-48Hkmz1wDy+hVjRGrkkFJqXBEgzoezPmhE8pXAXbg@mail.gmail.com>

On Thu, 2018-02-01 at 20:34 +0800, Tonghao Zhang wrote:
> Hi Eric
> One question for you, In the patch ef547f2ac16 ("tcp: remove
> max_qlen_log"),  why we compared the length of req sock queue with
> sk_max_ack_backlog. If we remove the max_qlen_log, we should check the
> length of req sock queue with tcp_max_syn_backlog, right ?
> 
> With this patch, the option "/proc/sys/net/ipv4/tcp_max_syn_backlog"
> will be unsed anymore, right ?

Not right.

Please "git grep -n sysctl_max_syn_backlog" to convince it is still
used.

> 
> I hope we should
> 1. Add a variate in sock struct, such as sk_max_syn_backlog. Then req
> sock queue and accept sock queue can control their max value. When we
> create the sock, we can store the tcp_max_syn_backlog value to
> sk_max_syn_backlog.
> 

There is a single /proc/sys/net/ipv4/tcp_max_syn_backlog value shared
by all sockets of a given network namespace.

But you can have thousands of TCP listeners, each of them having a
distinct listen() backlog

> 2. Update the backlog, we can update it via ioctl.

No need to add an ugly ioctl.

Simply call listen() again with another backlog value.

  reply	other threads:[~2018-02-01 14:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-01 12:34 Compare length of req sock queue with sk_max_ack_backlog Tonghao Zhang
2018-02-01 14:00 ` Eric Dumazet [this message]
2018-02-02  1:55   ` Tonghao Zhang
2018-02-02  4:19     ` Eric Dumazet
2018-02-02  5:41       ` Tonghao Zhang

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=1517493607.3715.117.camel@gmail.com \
    --to=eric.dumazet@gmail.com \
    --cc=edumazet@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=xiangxia.m.yue@gmail.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.