On 03/30/2018 03:44 PM, Kirill Tkhai wrote: > Hi, Eric, > > thanks for more small patches in v2. One comment below. >
>> - >> -struct inet_frag_bucket { >> - struct hlist_head chain; >> - spinlock_t chain_lock; >> + struct netns_frags *net; >> + struct rcu_head rcu; > > inet_frag_destroy() calls call_rcu() after frags are destroyed. > It looks like we may place this rcu in union with fragments and > fragments_tail and to sa No, because I am planning to free skbs in the rcu call back very shortly. As I mentioned, I believe we could use pure RCU lookups, without grabing a reference and then release it after packet is processed/added to the queue. This is not urgent, I wanted to get the first patches for review before doing this final step, as I do not expect more than 5 % improvement from this optimization. Also note that the ipq structure is 192 bytes, nicely using 3 cache lines. Trying to save 16 bytes will likely reduce performance, unless we force padding to reach 192 bytes again :)