Re: neighbour table RCU
From: Eric Dumazet <hidden>
Date: 2009-09-01 06:50:16
Stephen Hemminger a écrit :
Looking at the neighbour table, it should be possible to get rid of the two reader/writer locks. The hash table lock is pretty amenable to RCU, but the dynamic resizing makes it non-trivial. Thinking of using a combination of RCU and sequence counts so that the reader would just rescan if resize was in progress.
I am not sure neigh_tbl_lock rwlock should be changed, I did not see any contention on it.
The reader/writer lock on the neighbour entry is more of a problem. Probably would be simpler/faster to change it into a spinlock and be done with it. The reader/writer lock is also used for the proxy list hash table, but that can just be a simple spinlock.
This is probably is the only thing we want to do at this moment, halving atomic ops on neigh_resolve_output() But why neigh_resolve_output() was called so much in the bench is the question...