Re: [net-next PATCH V2 3/9] net: frag, move LRU list maintenance outside of rwlock
From: David Miller <davem@davemloft.net>
Date: 2012-11-29 17:48:41
From: David Miller <davem@davemloft.net>
Date: 2012-11-29 17:48:41
From: Eric Dumazet <redacted> Date: Thu, 29 Nov 2012 09:43:24 -0800
Use a schem with a hash table of 256 (or 1024) slots. Each slot/bucket has : - Its own spinlock. - List of items - A limit of 5 (or so) elems in the list. No more LRU, no more rehash (thanks to jhash and the random seed at boot or first frag created), no more reader-writer lock. Use a percpu_counter to implement ipfrag_low_thresh/ipfrag_high_thresh
If we limit the chain sizes to 5 elements, there is no need for any thresholds at all.