netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [IPSEC] flow: reorder "struct flow_cache_entry" and remove SLAB_HWCACHE_ALIGN
@ 2008-02-08  7:12 Eric Dumazet
  2008-02-08  7:31 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Dumazet @ 2008-02-08  7:12 UTC (permalink / raw)
  To: David S. Miller; +Cc: Linux Netdev List

[-- Attachment #1: Type: text/plain, Size: 235 bytes --]

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>


[-- Attachment #2: flow.patch --]
[-- Type: text/plain, Size: 610 bytes --]

diff --git a/net/core/flow.c b/net/core/flow.c
index 9cfe845..a77531c 100644
--- a/net/core/flow.c
+++ b/net/core/flow.c
@@ -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;
 };
@@ -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;

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [IPSEC] flow: reorder "struct flow_cache_entry" and remove SLAB_HWCACHE_ALIGN
  2008-02-08  7:12 [IPSEC] flow: reorder "struct flow_cache_entry" and remove SLAB_HWCACHE_ALIGN Eric Dumazet
@ 2008-02-08  7:31 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2008-02-08  7:31 UTC (permalink / raw)
  To: dada1; +Cc: netdev

From: Eric Dumazet <dada1@cosmosbay.com>
Date: Fri, 08 Feb 2008 08:12:49 +0100

> 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>

Applied, thanks Eric.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-02-08  7:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-08  7:12 [IPSEC] flow: reorder "struct flow_cache_entry" and remove SLAB_HWCACHE_ALIGN Eric Dumazet
2008-02-08  7:31 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).