[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1334052194.3126.66.camel@edumazet-glaptop>
Date: Tue, 10 Apr 2012 12:03:14 +0200
From: Eric Dumazet <eric.dumazet@...il.com>
To: monstr@...str.eu
Cc: netdev@...r.kernel.org,
John Williams <john.williams@...alogix.com>,
David Miller <davem@...emloft.net>,
Jason Wang <jasowang@...hat.com>,
Glauber Costa <glommer@...allels.com>
Subject: [PATCH] tcp: restore correct limit
Commit c43b874d5d714f (tcp: properly initialize tcp memory limits)
added a regression on machines with low amount of memory, since sockets
cant use 1/128 of memory but 1/1024
Fix this to match comment and previous behavior.
Signed-off-by: Eric Dumazet <eric.dumazet@...il.com>
Cc: Jason Wang <jasowang@...hat.com>
Cc: Glauber Costa <glommer@...allels.com>
---
net/ipv4/tcp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 5d54ed3..67d726e 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -3302,7 +3302,7 @@ void __init tcp_init(void)
tcp_init_mem(&init_net);
/* Set per-socket limits to no more than 1/128 the pressure threshold */
- limit = nr_free_buffer_pages() << (PAGE_SHIFT - 10);
+ limit = nr_free_buffer_pages() << (PAGE_SHIFT - 7);
limit = max(limit, 128UL);
max_share = min(4UL*1024*1024, limit);
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists