mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* PATCH: tidy for the max_thread stuff from the kernel list
@ 2002-10-08 19:07 Alan Cox
  2002-10-09  0:59 ` John Levon
  0 siblings, 1 reply; 2+ messages in thread
From: Alan Cox @ 2002-10-08 19:07 UTC (permalink / raw)
  To: torvalds, linux-kernel

diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.2.5.41/kernel/fork.c linux.2.5.41-ac1/kernel/fork.c
--- linux.2.5.41/kernel/fork.c	2002-10-07 22:12:28.000000000 +0100
+++ linux.2.5.41-ac1/kernel/fork.c	2002-10-07 23:17:19.000000000 +0100
@@ -165,12 +165,14 @@
 	 * of memory.
 	 */
 	max_threads = mempages / (THREAD_SIZE/PAGE_SIZE) / 8;
-
 	/*
-	 * we need to allow at least 10 threads to boot a system
+	 * we need to allow at least 20 threads to boot a system
 	 */
-	init_task.rlim[RLIMIT_NPROC].rlim_cur = max(10, max_threads/2);
-	init_task.rlim[RLIMIT_NPROC].rlim_max = max(10, max_threads/2);
+	if(max_threads < 20)
+		max_threads = 20;
+
+	init_task.rlim[RLIMIT_NPROC].rlim_cur = max_threads/2;
+	init_task.rlim[RLIMIT_NPROC].rlim_max = max_threads/2;
 }
 
 static struct task_struct *dup_task_struct(struct task_struct *orig)

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-10-09  0:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-08 19:07 PATCH: tidy for the max_thread stuff from the kernel list Alan Cox
2002-10-09  0:59 ` John Levon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®