Re: neighbour table RCU
From: Stephen Hemminger <hidden>
Date: 2009-09-01 16:23:29
On Tue, 1 Sep 2009 18:55:34 +0300 Octavian Purdila [off-list ref] wrote:
On Tuesday 01 September 2009 09:50:17 Eric Dumazet wrote:quoted
Stephen Hemminger a écrit :quoted
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.Speaking about neighbour optimizations, here is a RFC patch which makes the tables double linked, for constant time deletion. It has given us a significant performance improvement - in less then usual setups though, with lots of neighbours. Would something like this be acceptable for upstream? (pardon the p4 diff dump :) - but I think it will give a rough idea, if acceptable will clean it up and properly submit it) BTW, would switching to list_head be better?
Use hlist for the neighbour table. It has the right properties and makes future RCU easier.