linux/net
Ying Xue 07f6c4bc04 tipc: convert tipc reference table to use generic rhashtable
As tipc reference table is statically allocated, its memory size
requested on stack initialization stage is quite big even if the
maximum port number is just restricted to 8191 currently, however,
the number already becomes insufficient in practice. But if the
maximum ports is allowed to its theory value - 2^32, its consumed
memory size will reach a ridiculously unacceptable value. Apart from
this, heavy tipc users spend a considerable amount of time in
tipc_sk_get() due to the read-lock on ref_table_lock.

If tipc reference table is converted with generic rhashtable, above
mentioned both disadvantages would be resolved respectively: making
use of the new resizable hash table can avoid locking on the lookup;
smaller memory size is required at initial stage, for example, 256
hash bucket slots are requested at the beginning phase instead of
allocating the entire 8191 slots in old mode. The hash table will
grow if entries exceeds 75% of table size up to a total table size
of 1M, and it will automatically shrink if usage falls below 30%,
but the minimum table size is allowed down to 256.

Also converts ref_table_lock to a separate mutex to protect hash table
mutations on write side. Lastly defers the release of the socket
reference using call_rcu() to allow using an RCU read-side protected
call to rhashtable_lookup().

Signed-off-by: Ying Xue <ying.xue@windriver.com>
Acked-by: Jon Maloy <jon.maloy@ericsson.com>
Acked-by: Erik Hugne <erik.hugne@ericsson.com>
Cc: Thomas Graf <tgraf@suug.ch>
Acked-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-01-08 19:47:14 -08:00
..
6lowpan
9p
802
8021q
appletalk
atm
ax25
batman-adv batman-adv: fix potential TT client + orig-node memory leak 2015-01-06 11:07:01 +01:00
bluetooth Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next 2015-01-02 15:58:21 -05:00
bridge net: Do not call ndo_dflt_fdb_dump if ndo_fdb_dump is defined 2015-01-05 22:52:06 -05:00
caif
can
ceph libceph: specify position of extent operation 2014-12-17 20:09:52 +03:00
core ethtool: Extend ethtool plugin module eeprom API to phylib 2015-01-06 17:16:55 -05:00
dcb
dccp
decnet net: tcp: add RTAX_CC_ALGO fib handling 2015-01-05 22:55:24 -05:00
dns_resolver
dsa
ethernet net: Add Transparent Ethernet Bridging GRO support. 2015-01-02 15:46:41 -05:00
hsr
ieee802154 nl802154: introduce support for cca settings 2014-12-19 00:19:23 +01:00
ipv4 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-01-06 22:29:20 -05:00
ipv6 net: tcp: add per route congestion control 2015-01-05 22:55:24 -05:00
ipx
irda
iucv
key
l2tp l2tp : multicast notification to the registered listeners 2014-12-31 14:17:20 -05:00
lapb
llc
mac80211 Revert "mac80211: Fix accounting of the tailroom-needed counter" 2015-01-05 10:33:46 +01:00
mac802154 ieee802154: iface: move multiple node type check 2014-12-20 00:06:55 +01:00
mpls mpls: Fix allowed protocols for mpls gso 2014-12-23 23:57:31 -05:00
netfilter rhashtable: Per bucket locks & deferred expansion/shrinking 2015-01-03 14:32:57 -05:00
netlabel
netlink netlink: Lockless lookup with RCU grace period in socket release 2015-01-03 14:32:57 -05:00
netrom
nfc
openvswitch openvswitch: Consistently include VLAN header in flow and port stats. 2015-01-02 16:14:20 -05:00
packet packet: Fixed TPACKET V3 to signal poll when block is closed rather than every packet 2014-12-22 15:41:15 -05:00
phonet
rds
rfkill
rose
rxrpc
sched
sctp
sunrpc
switchdev
tipc tipc: convert tipc reference table to use generic rhashtable 2015-01-08 19:47:14 -08:00
unix
vmw_vsock
wimax
wireless Revert "cfg80211: make WEXT compatibility unselectable" 2014-12-30 16:42:29 -08:00
x25
xfrm
compat.c
Kconfig
Makefile
socket.c [regression] chunk lost from bd9b51 2014-12-19 07:13:21 -05:00
sysctl_net.c