mirror of
https://github.com/genodelabs/genode.git
synced 2025-02-23 10:40:27 +00:00
20 lines
700 B
Diff
20 lines
700 B
Diff
|
Index: net/ipv4/tcp.c
|
||
|
===================================================================
|
||
|
--- net/ipv4/tcp.c (revision 23)
|
||
|
+++ net/ipv4/tcp.c (working copy)
|
||
|
@@ -3285,8 +3285,13 @@
|
||
|
|
||
|
/* Set per-socket limits to no more than 1/128 the pressure threshold */
|
||
|
limit = ((unsigned long)sysctl_tcp_mem[1]) << (PAGE_SHIFT - 7);
|
||
|
- max_share = min(4UL*1024*1024, limit);
|
||
|
|
||
|
+ /*
|
||
|
+ * Adjust limit so it performs well on systems with little memory. If
|
||
|
+ * this causes errors increase L4Linux main memory
|
||
|
+ */
|
||
|
+ max_share = min(4UL*1024*1024, limit < 768U * 1024 ? 768U * 1024 : limit);
|
||
|
+
|
||
|
sysctl_tcp_wmem[0] = SK_MEM_QUANTUM;
|
||
|
sysctl_tcp_wmem[1] = 16*1024;
|
||
|
sysctl_tcp_wmem[2] = max(64*1024, max_share);
|