diff options
| author | Eric Dumazet <[email protected]> | 2012-06-08 05:03:21 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2012-06-08 21:27:23 +0000 |
| commit | 7123aaa3a1416529ce461e98108e6b343b294643 (patch) | |
| tree | 094070a521666979523411422109cce72a1db8c4 /net/ipv6/tcp_ipv6.c | |
| parent | inetpeer: add parameter net for inet_getpeer_v4,v6 (diff) | |
| download | kernel-7123aaa3a1416529ce461e98108e6b343b294643.tar.gz kernel-7123aaa3a1416529ce461e98108e6b343b294643.zip | |
af_unix: speedup /proc/net/unix
/proc/net/unix has quadratic behavior, and can hold unix_table_lock for
a while if high number of unix sockets are alive. (90 ms for 200k
sockets...)
We already have a hash table, so its quite easy to use it.
Problem is unbound sockets are still hashed in a single hash slot
(unix_socket_table[UNIX_HASH_TABLE])
This patch also spreads unbound sockets to 256 hash slots, to speedup
both /proc/net/unix and unix_diag.
Time to read /proc/net/unix with 200k unix sockets :
(time dd if=/proc/net/unix of=/dev/null bs=4k)
before : 520 secs
after : 2 secs
Signed-off-by: Eric Dumazet <[email protected]>
Cc: Steven Whitehouse <[email protected]>
Cc: Pavel Emelyanov <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'net/ipv6/tcp_ipv6.c')
0 files changed, 0 insertions, 0 deletions
