From: Sven Eckelmann <s...@open-mesh.com>

A small system like the common home router doesn't have 40 MiB per process for
a dirty stack cache. This can easily lead to an overbooking OOM problem and
caused a lot of hangs+reboots on 32 MiB systems running nodogsplash.

Not using a stack cache can increase the time to spawn new threads. This is
hopefully no problem for system not running a lot of parallel computations.

Signed-off-by: Sven Eckelmann <s...@open-mesh.com>
---
 toolchain/uClibc/patches-0.9.33.2/990-no-stack-cache.patch | 11 +++++++++++
 1 file changed, 11 insertions(+)
 create mode 100644 toolchain/uClibc/patches-0.9.33.2/990-no-stack-cache.patch

diff --git a/toolchain/uClibc/patches-0.9.33.2/990-no-stack-cache.patch 
b/toolchain/uClibc/patches-0.9.33.2/990-no-stack-cache.patch
new file mode 100644
index 0000000..8f0b511
--- /dev/null
+++ b/toolchain/uClibc/patches-0.9.33.2/990-no-stack-cache.patch
@@ -0,0 +1,11 @@
+--- a/libpthread/nptl/allocatestack.c
++++ b/libpthread/nptl/allocatestack.c
+@@ -100,7 +100,7 @@
+ /* Cache handling for not-yet free stacks.  */
+ 
+ /* Maximum size in kB of cache.  */
+-static size_t stack_cache_maxsize = 40 * 1024 * 1024; /* 40MiBi by default.  
*/
++static size_t stack_cache_maxsize = 0; /* embedded systems don't have enough 
ram for dirty stack caches */
+ static size_t stack_cache_actsize;
+ 
+ /* Mutex protecting this variable.  */
-- 
1.8.4.2
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to