genode/repos/dde_linux/patches/tcp.patch
Sebastian Sumpf 98165dd91b dde_linux: Update to Linux 3.14.5
Update patch files and file lists.
2014-08-28 12:35:55 +02:00

25 lines
756 B
Diff

commit dc0fb534ff37768cdc4c6782fb25376f89ed04d3
Author: Sebastian Sumpf <sebastian.sumpf@genode-labs.com>
Date: Mon Jun 2 13:34:39 2014 +0200
tcp.patch
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 97c8f56..4091fe3 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -3209,6 +3209,13 @@ void __init tcp_init(void)
tcp_init_mem();
/* Set per-socket limits to no more than 1/128 the pressure threshold */
limit = nr_free_buffer_pages() << (PAGE_SHIFT - 7);
+
+ /*
+ * Adjust limit so it performs well on systems with little memory. If
+ * this causes errors increase L4Linux main memory
+ */
+ limit = limit < 1024U * 1024 ? 1024U * 1024 : limit;
+
max_wshare = min(4UL*1024*1024, limit);
max_rshare = min(6UL*1024*1024, limit);