linux/net/sunrpc
Paolo Abeni 7c13f97ffd udp: do fwd memory scheduling on dequeue
A new argument is added to __skb_recv_datagram to provide
an explicit skb destructor, invoked under the receive queue
lock.
The UDP protocol uses such argument to perform memory
reclaiming on dequeue, so that the UDP protocol does not
set anymore skb->desctructor.
Instead explicit memory reclaiming is performed at close() time and
when skbs are removed from the receive queue.
The in kernel UDP protocol users now need to call a
skb_recv_udp() variant instead of skb_recv_datagram() to
properly perform memory accounting on dequeue.

Overall, this allows acquiring only once the receive queue
lock on dequeue.

Tested using pktgen with random src port, 64 bytes packet,
wire-speed on a 10G link as sender and udp_sink as the receiver,
using an l4 tuple rxhash to stress the contention, and one or more
udp_sink instances with reuseport.

nr sinks	vanilla		patched
1		440		560
3		2150		2300
6		3650		3800
9		4450		4600
12		6250		6450

v1 -> v2:
 - do rmem and allocated memory scheduling under the receive lock
 - do bulk scheduling in first_packet_length() and in udp_destruct_sock()
 - avoid the typdef for the dequeue callback

Suggested-by: Eric Dumazet <edumazet@google.com>
Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-11-07 13:24:41 -05:00
..
auth_gss NFS client updates for Linux 4.9 2016-10-13 21:28:20 -07:00
xprtrdma NFS client updates for Linux 4.9 2016-10-13 21:28:20 -07:00
addr.c
auth_generic.c NFS client updates for Linux 4.9 2016-10-13 21:28:20 -07:00
auth_null.c
auth_unix.c NFS client updates for Linux 4.9 2016-10-13 21:28:20 -07:00
auth.c sunrpc: replace generic auth_cred hash with auth-specific function 2016-09-30 15:47:47 -04:00
backchannel_rqst.c
cache.c sunrpc: queue work on system_power_efficient_wq 2016-09-27 14:35:36 -04:00
clnt.c
debugfs.c
Kconfig rpcrdma: Merge svcrdma and xprtrdma modules into one 2015-06-04 16:56:02 -04:00
Makefile
netns.h
rpc_pipe.c fs: Replace CURRENT_TIME with current_time() for inode timestamps 2016-09-27 21:06:21 -04:00
rpcb_clnt.c
sched.c
socklib.c
stats.c
sunrpc_syms.c
sunrpc.h
svc_xprt.c
svc.c
svcauth_unix.c cred: simpler, 1D supplementary groups 2016-10-07 18:46:30 -07:00
svcauth.c
svcsock.c udp: do fwd memory scheduling on dequeue 2016-11-07 13:24:41 -05:00
sysctl.c
timer.c
xdr.c
xprt.c
xprtmultipath.c
xprtsock.c udp: do fwd memory scheduling on dequeue 2016-11-07 13:24:41 -05:00