genode/repos/ports-foc/patches/tcp_mem.patch
Norman Feske ca971bbfd8 Move repositories to 'repos/' subdirectory
This patch changes the top-level directory layout as a preparatory
step for improving the tools for managing 3rd-party source codes.
The rationale is described in the issue referenced below.

Issue #1082
2014-05-14 16:08:00 +02:00

19 lines
616 B
Diff

Index: net/ipv4/tcp.c
===================================================================
--- net/ipv4/tcp.c (revision 25)
+++ net/ipv4/tcp.c (working copy)
@@ -3549,6 +3549,13 @@
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 - 7);
+
+ /*
+ * Adjust limit so it performs well on systems with little memory. If
+ * this causes errors increase L4Linux main memory
+ */
+ limit = limit < 768U * 1024 ? 768U * 1024 : limit;
+
max_wshare = min(4UL*1024*1024, limit);
max_rshare = min(6UL*1024*1024, limit);