[NETNS][FRAGS]: Make the LRU list per namespace.
The inet_frags.lru_list is used for evicting only, so we have to make it per-namespace, to evict only those fragments, who's namespace exceeded its high threshold, but not the whole hash. Besides, this helps to avoid long loops in evictor. The spinlock is not per-namespace because it protects the hash table as well, which is global. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
3b4bc4a2bf
commit
3140c25c82
@ -424,7 +424,7 @@ static int ip6_frag_queue(struct frag_queue *fq, struct sk_buff *skb,
|
||||
return ip6_frag_reasm(fq, prev, dev);
|
||||
|
||||
write_lock(&ip6_frags.lock);
|
||||
list_move_tail(&fq->q.lru_list, &ip6_frags.lru_list);
|
||||
list_move_tail(&fq->q.lru_list, &fq->q.net->lru_list);
|
||||
write_unlock(&ip6_frags.lock);
|
||||
return -1;
|
||||
|
||||
|
Reference in New Issue
Block a user