diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2008-02-03 07:06:59 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-02-03 07:28:52 -0500 |
commit | 4e7e5cfe3825b4d854fc005d784a6f551b3c039f (patch) | |
tree | 0facec726e4a8f410e74d30234bb8f4894f8c186 /include/net/if_inet6.h | |
parent | ab1e0a13d70299e792fd0527cefd070c1405fa5b (diff) |
[INET6]: Reorganize struct inet6_dev to save 8 bytes
And make it a multiple of a 64 bytes, reducing cacheline trashing:
Before:
[acme@doppio net-2.6]$ pahole -C inet6_dev net/dccp/ipv6.o
struct inet6_dev {
<SNIP>
long unsigned int mc_maxdelay; /* 48 8 */
unsigned char mc_qrv; /* 56 1 */
unsigned char mc_gq_running; /* 57 1 */
unsigned char mc_ifc_count; /* 58 1 */
/* XXX 5 bytes hole, try to pack */
/* --- cacheline 1 boundary (64 bytes) --- */
struct timer_list mc_gq_timer; /* 64 48 */
<SNIP>
__u32 if_flags; /* 180 4 */
int dead; /* 184 4 */
u8 rndid[8]; /* 188 8 */
/* XXX 4 bytes hole, try to pack */
/* --- cacheline 3 boundary (192 bytes) was 8 bytes ago --- */
struct timer_list regen_timer; /* 200 48 */
<SNIP>
/* size: 456, cachelines: 8 */
/* sum members: 447, holes: 2, sum holes: 9 */
/* last cacheline: 8 bytes */
};
After:
net-2.6/net/ipv6/af_inet6.c:
struct inet6_dev | -8
1 struct changed
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/if_inet6.h')
-rw-r--r-- | include/net/if_inet6.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/net/if_inet6.h b/include/net/if_inet6.h index b24508abb850..66c43e29ea0a 100644 --- a/include/net/if_inet6.h +++ b/include/net/if_inet6.h | |||
@@ -166,11 +166,11 @@ struct inet6_dev | |||
166 | struct ifmcaddr6 *mc_list; | 166 | struct ifmcaddr6 *mc_list; |
167 | struct ifmcaddr6 *mc_tomb; | 167 | struct ifmcaddr6 *mc_tomb; |
168 | rwlock_t mc_lock; | 168 | rwlock_t mc_lock; |
169 | unsigned long mc_v1_seen; | ||
170 | unsigned long mc_maxdelay; | ||
171 | unsigned char mc_qrv; | 169 | unsigned char mc_qrv; |
172 | unsigned char mc_gq_running; | 170 | unsigned char mc_gq_running; |
173 | unsigned char mc_ifc_count; | 171 | unsigned char mc_ifc_count; |
172 | unsigned long mc_v1_seen; | ||
173 | unsigned long mc_maxdelay; | ||
174 | struct timer_list mc_gq_timer; /* general query timer */ | 174 | struct timer_list mc_gq_timer; /* general query timer */ |
175 | struct timer_list mc_ifc_timer; /* interface change timer */ | 175 | struct timer_list mc_ifc_timer; /* interface change timer */ |
176 | 176 | ||