aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp.c
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2006-12-01 04:56:43 -0500
committerDavid Woodhouse <dwmw2@infradead.org>2006-12-01 04:56:43 -0500
commitbd3c97a7c718bfb9f1e4f31c16c383a5c6f815eb (patch)
tree3f56594e813c6f35cbacbdb3e137ba5bfd0b3069 /net/ipv4/tcp.c
parent6c33cafc794d07c9254c160789120a0e98c088c9 (diff)
parent0215ffb08ce99e2bb59eca114a99499a4d06e704 (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'net/ipv4/tcp.c')
-rw-r--r--net/ipv4/tcp.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 66e9a729f6df..c05e8edaf544 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -2270,7 +2270,7 @@ void __init tcp_init(void)
2270 thash_entries, 2270 thash_entries,
2271 (num_physpages >= 128 * 1024) ? 2271 (num_physpages >= 128 * 1024) ?
2272 13 : 15, 2272 13 : 15,
2273 HASH_HIGHMEM, 2273 0,
2274 &tcp_hashinfo.ehash_size, 2274 &tcp_hashinfo.ehash_size,
2275 NULL, 2275 NULL,
2276 0); 2276 0);
@@ -2286,7 +2286,7 @@ void __init tcp_init(void)
2286 tcp_hashinfo.ehash_size, 2286 tcp_hashinfo.ehash_size,
2287 (num_physpages >= 128 * 1024) ? 2287 (num_physpages >= 128 * 1024) ?
2288 13 : 15, 2288 13 : 15,
2289 HASH_HIGHMEM, 2289 0,
2290 &tcp_hashinfo.bhash_size, 2290 &tcp_hashinfo.bhash_size,
2291 NULL, 2291 NULL,
2292 64 * 1024); 2292 64 * 1024);
@@ -2316,9 +2316,10 @@ void __init tcp_init(void)
2316 sysctl_max_syn_backlog = 128; 2316 sysctl_max_syn_backlog = 128;
2317 } 2317 }
2318 2318
2319 sysctl_tcp_mem[0] = 768 << order; 2319 /* Allow no more than 3/4 kernel memory (usually less) allocated to TCP */
2320 sysctl_tcp_mem[1] = 1024 << order; 2320 sysctl_tcp_mem[0] = (1536 / sizeof (struct inet_bind_hashbucket)) << order;
2321 sysctl_tcp_mem[2] = 1536 << order; 2321 sysctl_tcp_mem[1] = sysctl_tcp_mem[0] * 4 / 3;
2322 sysctl_tcp_mem[2] = sysctl_tcp_mem[0] * 2;
2322 2323
2323 limit = ((unsigned long)sysctl_tcp_mem[1]) << (PAGE_SHIFT - 7); 2324 limit = ((unsigned long)sysctl_tcp_mem[1]) << (PAGE_SHIFT - 7);
2324 max_share = min(4UL*1024*1024, limit); 2325 max_share = min(4UL*1024*1024, limit);