Commit ff710b16 authored by Alan Cox's avatar Alan Cox Committed by Linus Torvalds

[PATCH] tidy for the max_thread stuff from the kernel list

parent 90a2541d
...@@ -165,12 +165,14 @@ void __init fork_init(unsigned long mempages) ...@@ -165,12 +165,14 @@ void __init fork_init(unsigned long mempages)
* of memory. * of memory.
*/ */
max_threads = mempages / (THREAD_SIZE/PAGE_SIZE) / 8; 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); if(max_threads < 20)
init_task.rlim[RLIMIT_NPROC].rlim_max = max(10, max_threads/2); 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) static struct task_struct *dup_task_struct(struct task_struct *orig)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment