1
0
Fork 0
alistair23-linux/net/sunrpc
Paolo Abeni 850cbaddb5 udp: use it's own memory accounting schema
Completely avoid default sock memory accounting and replace it
with udp-specific accounting.

Since the new memory accounting model encapsulates completely
the required locking, remove the socket lock on both enqueue and
dequeue, and avoid using the backlog on enqueue.

Be sure to clean-up rx queue memory on socket destruction, using
udp its own sk_destruct.

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 readers      Kpps (vanilla)  Kpps (patched)
1               170             440
3               1250            2150
6               3000            3650
9               4200            4450
12              5700            6250

v4 -> v5:
  - avoid unneeded test in first_packet_length

v3 -> v4:
  - remove useless sk_rcvqueues_full() call

v2 -> v3:
  - do not set the now unsed backlog_rcv callback

v1 -> v2:
  - add memory pressure support
  - fixed dropwatch accounting for ipv6

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-10-22 17:05:05 -04: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
Kconfig rpcrdma: Merge svcrdma and xprtrdma modules into one 2015-06-04 16:56:02 -04:00
Makefile SUNRPC: Add a structure to track multiple transports 2016-02-05 18:48:54 -05:00
addr.c replace strict_strto calls 2014-07-12 18:45:49 -04:00
auth.c sunrpc: replace generic auth_cred hash with auth-specific function 2016-09-30 15:47:47 -04:00
auth_generic.c NFS client updates for Linux 4.9 2016-10-13 21:28:20 -07:00
auth_null.c sunrpc: move NO_CRKEY_TIMEOUT to the auth->au_flags 2016-07-19 16:23:24 -04:00
auth_unix.c NFS client updates for Linux 4.9 2016-10-13 21:28:20 -07:00
backchannel_rqst.c SUNRPC: Refactor rpc_xdr_buf_init() 2016-09-19 13:08:37 -04:00
cache.c sunrpc: queue work on system_power_efficient_wq 2016-09-27 14:35:36 -04:00
clnt.c SUNRPC: Separate buffer pointers for RPC Call and Reply messages 2016-09-19 13:08:37 -04:00
debugfs.c SUNRPC: Address kbuild warning in net/sunrpc/debugfs.c 2015-06-11 14:01:06 -04:00
netns.h Merge branch 'for-3.14' of git://linux-nfs.org/~bfields/linux 2014-01-30 10:18:43 -08:00
rpc_pipe.c fs: Replace CURRENT_TIME with current_time() for inode timestamps 2016-09-27 21:06:21 -04:00
rpcb_clnt.c SUNRPC: Use the multipath iterator to assign a transport to each task 2016-02-05 18:48:55 -05:00
sched.c SUNRPC: Separate buffer pointers for RPC Call and Reply messages 2016-09-19 13:08:37 -04:00
socklib.c sunrpc: do not pull udp headers on receive 2016-04-11 15:31:33 -04:00
stats.c sunrpc: add rpc_count_iostats_idx 2015-02-03 11:06:38 -08:00
sunrpc.h SUNRPC: track whether a request is coming from a loop-back interface. 2014-05-22 15:59:18 -04:00
sunrpc_syms.c sunrpc: make debugfs file creation failure non-fatal 2015-04-23 14:42:27 -04:00
svc.c SUNRPC: Initialise struct svc_serv backchannel fields during __svc_create() 2016-09-19 13:08:36 -04:00
svc_xprt.c SUNRPC: Remove unused callback xpo_adjust_wspace() 2016-07-13 15:53:50 -04:00
svcauth.c svcrpc: move some initialization to common code 2015-11-24 10:39:16 -07:00
svcauth_unix.c cred: simpler, 1D supplementary groups 2016-10-07 18:46:30 -07:00
svcsock.c udp: use it's own memory accounting schema 2016-10-22 17:05:05 -04:00
sysctl.c Sunrpc: Supports hexadecimal number for sysctl files of sunrpc debug 2015-11-03 15:56:49 -05:00
timer.c net: cleanup unsigned to unsigned int 2012-04-15 12:44:40 -04:00
xdr.c SUNRPC: Fix setting of buffer length in xdr_set_next_buffer() 2016-09-22 17:17:47 -04:00
xprt.c SUNRPC: Generalize the RPC buffer release API 2016-09-19 13:08:37 -04:00
xprtmultipath.c SUNRPC search xprt switch for sockaddr 2016-09-19 13:08:36 -04:00
xprtsock.c udp: use it's own memory accounting schema 2016-10-22 17:05:05 -04:00