Skip to content

Commit

Permalink
[IPSEC] flow: reorder "struct flow_cache_entry" and remove SLAB_HWCAC…
Browse files Browse the repository at this point in the history
…HE_ALIGN

1) We can shrink sizeof(struct flow_cache_entry) by 8 bytes on 64bit arches.
2) No need to align these structures to hardware cache lines, this only waste 
   ram for very litle gain.

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Feb 8, 2008
1 parent fca09fb commit dd5a184
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/core/flow.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ struct flow_cache_entry {
struct flow_cache_entry *next;
u16 family;
u8 dir;
struct flowi key;
u32 genid;
struct flowi key;
void *object;
atomic_t *object_ref;
};
Expand Down Expand Up @@ -346,7 +346,7 @@ static int __init flow_cache_init(void)

flow_cachep = kmem_cache_create("flow_cache",
sizeof(struct flow_cache_entry),
0, SLAB_HWCACHE_ALIGN|SLAB_PANIC,
0, SLAB_PANIC,
NULL);
flow_hash_shift = 10;
flow_lwm = 2 * flow_hash_size;
Expand Down

0 comments on commit dd5a184

Please sign in to comment.