linux/net
Eric Dumazet 4b9d9be839 inetpeer: remove unused list
Andi Kleen and Tim Chen reported huge contention on inetpeer
unused_peers.lock, on memcached workload on a 40 core machine, with
disabled route cache.

It appears we constantly flip peers refcnt between 0 and 1 values, and
we must insert/remove peers from unused_peers.list, holding a contended
spinlock.

Remove this list completely and perform a garbage collection on-the-fly,
at lookup time, using the expired nodes we met during the tree
traversal.

This removes a lot of code, makes locking more standard, and obsoletes
two sysctls (inet_peer_gc_mintime and inet_peer_gc_maxtime). This also
removes two pointers in inet_peer structure.

There is still a false sharing effect because refcnt is in first cache
line of object [were the links and keys used by lookups are located], we
might move it at the end of inet_peer structure to let this first cache
line mostly read by cpus.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
CC: Andi Kleen <andi@firstfloor.org>
CC: Tim Chen <tim.c.chen@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-08 17:05:30 -07:00
..
9p Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband 2011-05-26 12:13:57 -07:00
802
8021q Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2011-06-04 13:38:31 -07:00
appletalk
atm net: remove interrupt.h inclusion from netdevice.h 2011-06-06 22:55:11 -07:00
ax25
batman-adv net: Remove unnecessary semicolons 2011-06-05 14:33:39 -07:00
bluetooth net: Remove unnecessary semicolons 2011-06-05 14:33:39 -07:00
bridge Merge branch 'pablo/nf-2.6-updates' of git://1984.lsi.us.es/net-2.6 2011-05-27 13:04:40 -04:00
caif net: remove interrupt.h inclusion from netdevice.h 2011-06-06 22:55:11 -07:00
can net: remove interrupt.h inclusion from netdevice.h 2011-06-06 22:55:11 -07:00
ceph libceph: subscribe to osdmap when cluster is full 2011-05-24 11:52:11 -07:00
core v2 ethtool: remove support for ETHTOOL_GRXNTUPLE 2011-06-08 16:45:31 -07:00
dcb
dccp
decnet
dns_resolver
dsa
econet
ethernet
ieee802154
ipv4 inetpeer: remove unused list 2011-06-08 17:05:30 -07:00
ipv6 tcp: RFC2988bis + taking RTT sample from 3WHS for the passive open side 2011-06-08 17:05:30 -07:00
ipx
irda
iucv [S390] irq: merge irq.c and s390_ext.c 2011-05-26 09:48:24 +02:00
key
l2tp
lapb
llc
mac80211 mac80211: Stop BA session event from device 2011-06-07 14:41:36 -04:00
netfilter IPVS: bug in ip_vs_ftp, same list heaad used in all netns. 2011-05-27 13:37:46 +02:00
netlabel
netlink
netrom
packet af-packet: Use existing netdev reference for bound sockets. 2011-06-05 14:16:28 -07:00
phonet
rds net: remove interrupt.h inclusion from netdevice.h 2011-06-06 22:55:11 -07:00
rfkill
rose
rxrpc
sched net: remove interrupt.h inclusion from netdevice.h 2011-06-06 22:55:11 -07:00
sctp sctp: Guard IPV6 specific code properly. 2011-06-06 13:05:55 -07:00
sunrpc net: remove interrupt.h inclusion from netdevice.h 2011-06-06 22:55:11 -07:00
tipc
unix
wanrouter
wimax
wireless Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 2011-06-07 14:07:11 -04:00
x25
xfrm
compat.c
Kconfig
Makefile
nonet.c
socket.c
sysctl_net.c
TUNABLE