From c12d2f80f2b11aebd0a3c6e8f87f5d4321f333bb Mon Sep 17 00:00:00 2001 From: Stefan Kalkowski Date: Sun, 23 Sep 2012 13:54:29 +0200 Subject: [PATCH] L4lx: re-apply network performance hook Re-enable tcp-patch introduced by Sebastian Sumpf that tweaks TCP rmem, and wmem buffer sizes to show better performance results. --- ports-foc/Makefile | 2 +- ports-foc/patches/tcp_mem.patch | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 ports-foc/patches/tcp_mem.patch diff --git a/ports-foc/Makefile b/ports-foc/Makefile index 7537126553..a6b866611e 100644 --- a/ports-foc/Makefile +++ b/ports-foc/Makefile @@ -8,7 +8,7 @@ VERBOSE ?= @ ECHO = @echo TARGET ?= l4linux -PATCH-l4linux = $(addprefix patches/,l4lx_genode.patch icmp_align.patch) +PATCH-l4linux = $(addprefix patches/,l4lx_genode.patch icmp_align.patch tcp_mem.patch) REV-l4linux = 25 REPO-l4linux = http://svn.tudos.org/repos/oc/l4linux/trunk diff --git a/ports-foc/patches/tcp_mem.patch b/ports-foc/patches/tcp_mem.patch new file mode 100644 index 0000000000..5f2c8f3e1b --- /dev/null +++ b/ports-foc/patches/tcp_mem.patch @@ -0,0 +1,18 @@ +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); +