diff options
| author | Rusty Russell <rusty@rustcorp.com.au> | 2004-09-23 00:36:22 -0700 |
|---|---|---|
| committer | David S. Miller <davem@kernel.bkbits.net> | 2004-09-23 00:36:22 -0700 |
| commit | 789575b2f4a6c79c9852b78ce1e1397979d6683c (patch) | |
| tree | 8574990f2b8198db1df679672d86d8fe547c504e /include/linux | |
| parent | 6c7dd95fa77ce9545f85d0f708ef6d09f4b55bde (diff) | |
[NETFILTER]: Shuffle conntrack structure for better cacheline behavior
Every time we walk the conntrack hashtable list, we hit the same
cacheline that is dirtied by the use of the conntrack
entry. Shuffling these entries to the end should help this
(sizeof(struct ip_conntrack)) > cacheline size).
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/netfilter_ipv4/ip_conntrack.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/netfilter_ipv4/ip_conntrack.h b/include/linux/netfilter_ipv4/ip_conntrack.h index 8f7953a5e7f6..6c115127e799 100644 --- a/include/linux/netfilter_ipv4/ip_conntrack.h +++ b/include/linux/netfilter_ipv4/ip_conntrack.h @@ -172,9 +172,6 @@ struct ip_conntrack plus 1 for any connection(s) we are `master' for */ struct nf_conntrack ct_general; - /* These are my tuples; original and reply */ - struct ip_conntrack_tuple_hash tuplehash[IP_CT_DIR_MAX]; - /* Have we seen traffic both ways yet? (bitset) */ unsigned long status; @@ -220,6 +217,9 @@ struct ip_conntrack } nat; #endif /* CONFIG_IP_NF_NAT_NEEDED */ + /* Traversed often, so hopefully in different cacheline to top */ + /* These are my tuples; original and reply */ + struct ip_conntrack_tuple_hash tuplehash[IP_CT_DIR_MAX]; }; /* get master conntrack via master expectation */ |
