[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20190708.193818.869894082642387542.davem@davemloft.net>
Date: Mon, 08 Jul 2019 19:38:18 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: willemdebruijn.kernel@...il.com
Cc: netdev@...r.kernel.org, willemb@...gle.com
Subject: Re: [PATCH net-next] ipv6: elide flowlabel check if no exclusive
leases exist
From: Willem de Bruijn <willemdebruijn.kernel@...il.com>
Date: Sun, 7 Jul 2019 05:34:45 -0400
> From: Willem de Bruijn <willemb@...gle.com>
>
> Processes can request ipv6 flowlabels with cmsg IPV6_FLOWINFO.
> If not set, by default an autogenerated flowlabel is selected.
>
> Explicit flowlabels require a control operation per label plus a
> datapath check on every connection (every datagram if unconnected).
> This is particularly expensive on unconnected sockets multiplexing
> many flows, such as QUIC.
>
> In the common case, where no lease is exclusive, the check can be
> safely elided, as both lease request and check trivially succeed.
> Indeed, autoflowlabel does the same even with exclusive leases.
>
> Elide the check if no process has requested an exclusive lease.
>
> fl6_sock_lookup previously returns either a reference to a lease or
> NULL to denote failure. Modify to return a real error and update
> all callers. On return NULL, they can use the label and will elide
> the atomic_dec in fl6_sock_release.
>
> This is an optimization. Robust applications still have to revert to
> requesting leases if the fast path fails due to an exclusive lease.
>
> Changes RFC->v1:
> - use static_key_false_deferred to rate limit jump label operations
> - call static_key_deferred_flush to stop timers on exit
> - move decrement out of RCU context
> - defer optimization also if opt data is associated with a lease
> - updated all fp6_sock_lookup callers, not just udp
>
> Signed-off-by: Willem de Bruijn <willemb@...gle.com>
Looks good, applied, thanks Willem.
Powered by blists - more mailing lists