diff options
author | Pavel Emelyanov <xemul@openvz.org> | 2008-01-22 09:11:48 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:10:39 -0500 |
commit | 3140c25c82106645a6b1fc469dab7006a1d09fd0 (patch) | |
tree | cbf97e7138610c1f1f0ad4528d59b4bbd14039c7 /include/net | |
parent | 3b4bc4a2bfe80d01ebd4f2b6dcc58986c970ed16 (diff) |
[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>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/inet_frag.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/inet_frag.h b/include/net/inet_frag.h index 1917fbeb362b..3695ff4cfe63 100644 --- a/include/net/inet_frag.h +++ b/include/net/inet_frag.h | |||
@@ -4,6 +4,7 @@ | |||
4 | struct netns_frags { | 4 | struct netns_frags { |
5 | int nqueues; | 5 | int nqueues; |
6 | atomic_t mem; | 6 | atomic_t mem; |
7 | struct list_head lru_list; | ||
7 | 8 | ||
8 | /* sysctls */ | 9 | /* sysctls */ |
9 | int timeout; | 10 | int timeout; |
@@ -32,7 +33,6 @@ struct inet_frag_queue { | |||
32 | #define INETFRAGS_HASHSZ 64 | 33 | #define INETFRAGS_HASHSZ 64 |
33 | 34 | ||
34 | struct inet_frags { | 35 | struct inet_frags { |
35 | struct list_head lru_list; | ||
36 | struct hlist_head hash[INETFRAGS_HASHSZ]; | 36 | struct hlist_head hash[INETFRAGS_HASHSZ]; |
37 | rwlock_t lock; | 37 | rwlock_t lock; |
38 | u32 rnd; | 38 | u32 rnd; |