]> Pileus Git - ~andy/linux/blobdiff - net/ipv4/tcp.c
tcp: change default tcp hash size
[~andy/linux] / net / ipv4 / tcp.c
index e6eace1c2bdbe8a8c40678b8a004b8776c1dc596..1aca02c9911e5e17749829bb8db9d162dc49a2df 100644 (file)
@@ -3590,8 +3590,7 @@ void __init tcp_init(void)
                alloc_large_system_hash("TCP established",
                                        sizeof(struct inet_ehash_bucket),
                                        thash_entries,
-                                       (totalram_pages >= 128 * 1024) ?
-                                       13 : 15,
+                                       17, /* one slot per 128 KB of memory */
                                        0,
                                        NULL,
                                        &tcp_hashinfo.ehash_mask,
@@ -3607,8 +3606,7 @@ void __init tcp_init(void)
                alloc_large_system_hash("TCP bind",
                                        sizeof(struct inet_bind_hashbucket),
                                        tcp_hashinfo.ehash_mask + 1,
-                                       (totalram_pages >= 128 * 1024) ?
-                                       13 : 15,
+                                       17, /* one slot per 128 KB of memory */
                                        0,
                                        &tcp_hashinfo.bhash_size,
                                        NULL,