diff options
author | Eric Dumazet <edumazet@google.com> | 2015-04-10 09:07:18 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-04-12 21:16:05 -0400 |
commit | 52db70dca5c206741f4f5c89410a2d32864f9840 (patch) | |
tree | 062b1d5355a19d40047ce39798bf38e9cfddeb7a /net/core | |
parent | 4e78eb0dbf867ccf206706ff2af34084f71a99bf (diff) |
tcp: do not cache align timewait sockets
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/sock.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/core/sock.c b/net/core/sock.c index 654e38a99759..e891bcf325ca 100644 --- a/net/core/sock.c +++ b/net/core/sock.c | |||
@@ -2799,8 +2799,7 @@ int proto_register(struct proto *prot, int alloc_slab) | |||
2799 | kmem_cache_create(prot->twsk_prot->twsk_slab_name, | 2799 | kmem_cache_create(prot->twsk_prot->twsk_slab_name, |
2800 | prot->twsk_prot->twsk_obj_size, | 2800 | prot->twsk_prot->twsk_obj_size, |
2801 | 0, | 2801 | 0, |
2802 | SLAB_HWCACHE_ALIGN | | 2802 | prot->slab_flags, |
2803 | prot->slab_flags, | ||
2804 | NULL); | 2803 | NULL); |
2805 | if (prot->twsk_prot->twsk_slab == NULL) | 2804 | if (prot->twsk_prot->twsk_slab == NULL) |
2806 | goto out_free_timewait_sock_slab_name; | 2805 | goto out_free_timewait_sock_slab_name; |