From: Tom Herbert <tom@herbertland.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Tolga Ceylan <tolga.ceylan@gmail.com>,
Aaron Conole <aconole@bytheb.org>,
"David S. Miller" <davem@davemloft.net>,
Linux Kernel Network Developers <netdev@vger.kernel.org>
Subject: Re: [PATCH 1/1] net: Add SO_REUSEPORT_LISTEN_OFF socket option as drain mode
Date: Wed, 11 Nov 2015 10:23:30 -0800 [thread overview]
Message-ID: <CALx6S37B4mGqYe63JkLmPeQNuOX_WMK2NHaOe7Dtt79Nv9Mo4g@mail.gmail.com> (raw)
In-Reply-To: <1447262610.17135.114.camel@edumazet-glaptop2.roam.corp.google.com>
On Wed, Nov 11, 2015 at 9:23 AM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
> On Wed, 2015-11-11 at 09:05 -0800, Tom Herbert wrote:
>> On Tue, Nov 10, 2015 at 10:19 PM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
>> > On Tue, 2015-11-10 at 21:41 -0800, Tom Herbert wrote:
>> >> Tolga, are you still planning to respin this patch (when tree opens?)
>> >
>> > I was planning to add an union on skc_tx_queue_mapping and
>> > sk_max_ack_backlog, so that adding a check on sk_max_ack_backlog in
>> > listener lookup would not add an additional cache line miss.
>> >
>> > This would remove false sharing because sk_ack_backlog is often dirtied
>> > when a socket is added into accept queue.
>> >
>> That's sounds like good fixes, but my question was more about the
>> problem originally described by Tolga where we are transitioning
>> processing for a listener port from one process to another. I think
>> the conclusion in this thread was to modify the code so that
>> listen(fd, 0) would stop new connections from being assigned to a
>> socket (as opposed to explicit SO_REUSEPORT_LISTEN_OFF option). Does
>> this still seem reasonable?
>
> Actually listen(fd, 0) is not going to work well :
>
> For request_sock that were created (by incoming SYN packet) before this
> listen(fd, 0) call, the 3rd packet (ACK coming from client) would not be
> able to create a child attached to this listener.
>
> sk_acceptq_is_full() test in tcp_v4_syn_recv_sock() would simply drop
> the thing.
>
> I was mainly objecting adding yet another socket option.
>
> Maybe setsockopt(... SO_REUSEPORT, &off, sizeof(off)) could detect the
> condition automatically ?
>
How about doing this in shutdown called for a listener?
> (I am not sure current behavior of setting sk->sk_reuseport = valbool;
> is correct if valbool==0 and current sk_reuseport is 1)
>
>
>
next prev parent reply other threads:[~2015-11-11 18:23 UTC|newest]
Thread overview: 61+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-27 0:30 [PATCH 1/1] net: Add SO_REUSEPORT_LISTEN_OFF socket option as drain mode Tolga Ceylan
2015-09-27 1:04 ` Eric Dumazet
2015-09-27 1:37 ` Tolga Ceylan
2015-09-27 1:44 ` Aaron Conole
2015-09-27 2:02 ` Tolga Ceylan
2015-09-27 2:24 ` Eric Dumazet
2015-11-11 5:41 ` Tom Herbert
2015-11-11 6:19 ` Eric Dumazet
2015-11-11 17:05 ` Tom Herbert
2015-11-11 17:23 ` Eric Dumazet
2015-11-11 18:23 ` Tom Herbert [this message]
2015-11-11 18:43 ` Eric Dumazet
2015-11-12 1:09 ` Eric Dumazet
2015-12-15 16:14 ` Willy Tarreau
2015-12-15 17:10 ` Eric Dumazet
2015-12-15 17:43 ` Willy Tarreau
2015-12-15 18:21 ` Eric Dumazet
2015-12-15 19:44 ` Willy Tarreau
2015-12-15 21:21 ` Eric Dumazet
2015-12-16 7:38 ` Willy Tarreau
2015-12-16 16:15 ` Willy Tarreau
2015-12-18 16:33 ` Josh Snyder
2015-12-18 18:58 ` Willy Tarreau
2015-12-19 2:38 ` Eric Dumazet
2015-12-19 7:00 ` Willy Tarreau
2015-12-21 20:38 ` Tom Herbert
2015-12-21 20:41 ` Willy Tarreau
2016-03-24 5:10 ` Tolga Ceylan
2016-03-24 6:12 ` Willy Tarreau
2016-03-24 14:13 ` Eric Dumazet
2016-03-24 14:22 ` Willy Tarreau
2016-03-24 14:45 ` Eric Dumazet
2016-03-24 15:30 ` Willy Tarreau
2016-03-24 16:33 ` Eric Dumazet
2016-03-24 16:50 ` Willy Tarreau
2016-03-24 17:01 ` Eric Dumazet
2016-03-24 17:26 ` Tom Herbert
2016-03-24 17:55 ` Daniel Borkmann
2016-03-24 18:20 ` Tolga Ceylan
2016-03-24 18:24 ` Willy Tarreau
2016-03-24 18:37 ` Eric Dumazet
2016-03-24 22:40 ` Yann Ylavic
2016-03-24 22:49 ` Eric Dumazet
2016-03-24 23:40 ` Yann Ylavic
2016-03-24 23:54 ` Tom Herbert
2016-03-25 0:01 ` Yann Ylavic
2016-03-25 5:28 ` Willy Tarreau
2016-03-25 6:49 ` Eric Dumazet
2016-03-25 8:53 ` Willy Tarreau
2016-03-25 11:21 ` Yann Ylavic
2016-03-25 13:17 ` Eric Dumazet
2016-03-25 0:25 ` David Miller
2016-03-25 0:24 ` David Miller
2016-03-24 18:00 ` Willy Tarreau
2016-03-24 18:21 ` Willy Tarreau
2016-03-24 18:32 ` Eric Dumazet
2016-03-25 15:29 Craig Gallek
2016-03-25 16:21 ` Alexei Starovoitov
2016-03-25 16:31 ` Craig Gallek
2016-03-25 17:00 ` Eric Dumazet
2016-03-25 18:31 ` Willem de Bruijn
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=CALx6S37B4mGqYe63JkLmPeQNuOX_WMK2NHaOe7Dtt79Nv9Mo4g@mail.gmail.com \
--to=tom@herbertland.com \
--cc=aconole@bytheb.org \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=tolga.ceylan@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 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).