diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2009-12-03 03:29:08 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-12-03 21:23:47 +0100 |
commit | 575f4cd5a5b639457747434dbe18d175fa767db4 (patch) | |
tree | 476224db152a2b5bef33046944cb77b5822fae26 /net/netlabel/netlabel_unlabeled.h | |
parent | net: Allow fib_rule_unregister to batch (diff) | |
download | linux-575f4cd5a5b639457747434dbe18d175fa767db4.tar.xz linux-575f4cd5a5b639457747434dbe18d175fa767db4.zip |
net: Use rcu lookups in inet_twsk_purge.
While we are looking up entries to free there is no reason to take
the lock in inet_twsk_purge. We have to drop locks and restart
occassionally anyway so adding a few more in case we get on the
wrong list because of a timewait move is no big deal. At the
same time not taking the lock for long periods of time is much
more polite to the rest of the users of the hash table.
In my test configuration of killing 4k network namespaces
this change causes 4k back to back runs of inet_twsk_purge on an
empty hash table to go from roughly 20.7s to 3.3s, and the total
time to destroy 4k network namespaces goes from roughly 44s to
3.3s.
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/netlabel/netlabel_unlabeled.h')
0 files changed, 0 insertions, 0 deletions