aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2013-11-18 13:32:06 +0000
committerFelix Fietkau <nbd@openwrt.org>2013-11-18 13:32:06 +0000
commit66913cd0207dd2b38454e415d439e9f30fabd2b2 (patch)
treefaca911422b85b85fc6560ca7b7196536f741bc1
parentbe2162f35b35a25128ff49b5c4ce86f60ce77a64 (diff)
downloadupstream-66913cd0207dd2b38454e415d439e9f30fabd2b2.tar.gz
upstream-66913cd0207dd2b38454e415d439e9f30fabd2b2.tar.bz2
upstream-66913cd0207dd2b38454e415d439e9f30fabd2b2.zip
uClibc: Deactivate oversized thread stack cache
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 <sven@open-mesh.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@38851 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--toolchain/uClibc/patches-0.9.33.2/990-no-stack-cache.patch11
1 files changed, 11 insertions, 0 deletions
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 0000000000..8f0b511ea6
--- /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. */