android_kernel_xiaomi_sm8350/net
Greg Banks 7b2b1fee30 [PATCH] knfsd: knfsd: cache ipmap per TCP socket
Speed up high call-rate workloads by caching the struct ip_map for the peer on
the connected struct svc_sock instead of looking it up in the ip_map cache
hashtable on every call.  This helps workloads using AUTH_SYS authentication
over TCP.

Testing was on a 4 CPU 4 NIC Altix using 4 IRIX clients, each with 16
synthetic client threads simulating an rsync (i.e.  recursive directory
listing) workload reading from an i386 RH9 install image (161480 regular files
in 10841 directories) on the server.  That tree is small enough to fill in the
server's RAM so no disk traffic was involved.  This setup gives a sustained
call rate in excess of 60000 calls/sec before being CPU-bound on the server.

Profiling showed strcmp(), called from ip_map_match(), was taking 4.8% of each
CPU, and ip_map_lookup() was taking 2.9%.  This patch drops both contribution
into the profile noise.

Note that the above result overstates this value of this patch for most
workloads.  The synthetic clients are all using separate IP addresses, so
there are 64 entries in the ip_map cache hash.  Because the kernel measured
contained the bug fixed in commit

commit 1f1e030bf7

and was running on 64bit little-endian machine, probably all of those 64
entries were on a single chain, thus increasing the cost of ip_map_lookup().

With a modern kernel you would need more clients to see the same amount of
performance improvement.  This patch has helped to scale knfsd to handle a
deployment with 2000 NFS clients.

Signed-off-by: Greg Banks <gnb@melbourne.sgi.com>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-04 07:55:16 -07:00
..
802 [TR]: endiannness annotations 2006-09-28 17:53:59 -07:00
8021q
appletalk [ATALK]: endianness annotations 2006-09-28 17:53:58 -07:00
atm [ATM]: [lec] use refcnt to protect lec_arp_entries outside lock 2006-09-29 17:17:17 -07:00
ax25
bluetooth [PATCH] const struct tty_operations 2006-10-02 07:57:14 -07:00
bridge [IPV4] net/ipv4/arp.c: trivial annotations 2006-09-28 18:02:14 -07:00
core [PATCH] slab: clean up leak tracking ifdefs a little bit 2006-10-04 07:55:13 -07:00
dccp [IPV4]: ip_route_connect() ipv4 address arguments annotated 2006-09-28 17:54:06 -07:00
decnet [NET]: Fix sk->sk_filter field access 2006-09-22 15:18:47 -07:00
econet
ethernet [NET]: Annotate dst_ops protocol 2006-09-28 18:02:58 -07:00
ieee80211 [PATCH] bcm43xx: WE-21 support 2006-09-25 16:52:16 -04:00
ipv4 fix file specification in comments 2006-10-03 23:01:26 +02:00
ipv6 [IPV6]: Disable SG for GSO unless we have checksum 2006-09-28 18:02:45 -07:00
ipx
irda [PATCH] const struct tty_operations 2006-10-02 07:57:14 -07:00
key [XFRM]: ports in struct xfrm_selector annotated 2006-09-28 18:02:33 -07:00
lapb
llc
netfilter [NETFILTER]: xt_limit: add compat conversion functions 2006-09-22 15:20:06 -07:00
netlabel [NetLabel]: audit fixups due to delayed feedback 2006-09-29 17:05:05 -07:00
netlink [GENL]: Provide more information to userspace about registered genl families 2006-09-22 15:18:51 -07:00
netrom
packet [NET]: Fix sk->sk_filter field access 2006-09-22 15:18:47 -07:00
rose
rxrpc [PATCH] kmemdup: some users 2006-10-01 00:39:19 -07:00
sched [NET_SCHED]: Fix fallout from dev->qdisc RCU change 2006-09-28 18:01:50 -07:00
sctp [SCTP]: Do not timestamp every SCTP packet. 2006-09-29 17:10:03 -07:00
sunrpc [PATCH] knfsd: knfsd: cache ipmap per TCP socket 2006-10-04 07:55:16 -07:00
tipc
unix [AF_UNIX]: Change max_dgram_qlen sysctl to __read_mostly 2006-09-22 15:18:42 -07:00
wanrouter
x25
xfrm [XFRM]: Do not add a state whose SPI is zero to the SPI hash. 2006-09-28 18:02:49 -07:00
compat.c
Kconfig [NET] Kconfig: fix cut/paste error in TCPPROBE 2006-09-28 17:53:57 -07:00
Makefile
nonet.c
socket.c [PATCH] file: modify struct fown_struct to use a struct pid 2006-10-02 07:57:14 -07:00
sysctl_net.c
TUNABLE