diff options
| author | Alan Cox <alan@lxorguk.ukuu.org.uk> | 2002-10-08 00:58:13 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2002-10-08 00:58:13 -0700 |
| commit | ff710b161f455911bd04e56aa3acbc7d2a03ab9c (patch) | |
| tree | 701f14c886d88ec7070c60c3f684291066ef8ee7 /kernel | |
| parent | 90a2541d8fd6c93e5ae7ce7784e4b5e7918286cc (diff) | |
[PATCH] tidy for the max_thread stuff from the kernel list
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/fork.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/kernel/fork.c b/kernel/fork.c index 9375e08fb8ce..f8620b82f8f5 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -165,12 +165,14 @@ void __init fork_init(unsigned long mempages) * 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) |
