[PATCH] Fork fix

From: dhowells
Date: Mon Nov 08 2004 - 09:36:46 EST


The attached patch fixes fork to get rid of the assumption that THREAD_SIZE >=
PAGE_SIZE (on the FR-V the smallest available page size is 16KB).

Signed-Off-By: dhowells@xxxxxxxxxx
---
diffstat fork-2610rc1mm3.diff
fork.c | 5 +++++
1 files changed, 5 insertions(+)

diff -uNrp /warthog/kernels/linux-2.6.10-rc1-mm3/kernel/fork.c linux-2.6.10-rc1-mm3-frv/kernel/fork.c
--- /warthog/kernels/linux-2.6.10-rc1-mm3/kernel/fork.c 2004-11-05 13:15:51.000000000 +0000
+++ linux-2.6.10-rc1-mm3-frv/kernel/fork.c 2004-11-05 14:13:04.517443917 +0000
@@ -119,7 +119,12 @@ void __init fork_init(unsigned long memp
* value: the thread structures can take up at most half
* of memory.
*/
+#if THREAD_SIZE >= PAGE_SIZE
max_threads = mempages / (THREAD_SIZE/PAGE_SIZE) / 8;
+#else
+ max_threads = mempages / 8;
+#endif
+
/*
* we need to allow at least 20 threads to boot a system
*/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/