fib_hash: RCU conversion phase 2
authorEric Dumazet <eric.dumazet@gmail.com>
Thu, 14 Oct 2010 20:56:39 +0000 (20:56 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sun, 17 Oct 2010 20:53:16 +0000 (13:53 -0700)
Get rid of fib_hash_lock rwlock.

The fn_zone hash table resize is the noticeable part of this patch.

I added a seqlock per fn_zone, so that readers can restart their lookup
in the (very rare) case a writer expanded the hash table.

Add rcu heads in fib_alias and fib_node, use call_rcu() to defer their
freeing, and use appropriate _rcu list manipulations.

Stress test (160.000.000 udp frames sent, IP route cache disabled to
mimic DDOS attack, FIB_HASH)

Before:
real 0m41.191s
user 0m13.137s
sys 8m55.241s

After:
real 0m38.091s
user 0m13.189s
sys 7m53.018s

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

No differences found