* [PATCH net-next] tcp: do not cache align timewait sockets
@ 2015-04-10 13:07 Eric Dumazet
2015-04-13 1:17 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Eric Dumazet @ 2015-04-10 13:07 UTC (permalink / raw)
To: David Miller; +Cc: netdev
From: Eric Dumazet <edumazet@google.com>
With recent adoption of skc_cookie in struct sock_common,
struct tcp_timewait_sock size increased from 192 to 200 bytes
on 64bit arches. SLAB rounds then to 256 bytes.
It is time to drop SLAB_HWCACHE_ALIGN constraint for twsk_slab.
This saves about 12 MB of memory on typical configuration reaching
262144 timewait sockets, and has no noticeable impact on performance.
Signed-off-by: Eric Dumazet <edumazet@google.com>
---
net/core/sock.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/net/core/sock.c b/net/core/sock.c
index 654e38a9975948f981f35716e7b9eac8569f0f93..e891bcf325ca759c9b7498f29ec76aa946198d5e 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -2799,8 +2799,7 @@ int proto_register(struct proto *prot, int alloc_slab)
kmem_cache_create(prot->twsk_prot->twsk_slab_name,
prot->twsk_prot->twsk_obj_size,
0,
- SLAB_HWCACHE_ALIGN |
- prot->slab_flags,
+ prot->slab_flags,
NULL);
if (prot->twsk_prot->twsk_slab == NULL)
goto out_free_timewait_sock_slab_name;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] tcp: do not cache align timewait sockets
2015-04-10 13:07 [PATCH net-next] tcp: do not cache align timewait sockets Eric Dumazet
@ 2015-04-13 1:17 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2015-04-13 1:17 UTC (permalink / raw)
To: eric.dumazet; +Cc: netdev
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Fri, 10 Apr 2015 06:07:18 -0700
> From: Eric Dumazet <edumazet@google.com>
>
> With recent adoption of skc_cookie in struct sock_common,
> struct tcp_timewait_sock size increased from 192 to 200 bytes
> on 64bit arches. SLAB rounds then to 256 bytes.
>
> It is time to drop SLAB_HWCACHE_ALIGN constraint for twsk_slab.
>
> This saves about 12 MB of memory on typical configuration reaching
> 262144 timewait sockets, and has no noticeable impact on performance.
>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
Looks reasonable, applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-04-13 1:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-10 13:07 [PATCH net-next] tcp: do not cache align timewait sockets Eric Dumazet
2015-04-13 1:17 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.