RE: Linux 2.4.7-ac1

From: Rik van Riel (riel@conectiva.com.br)
Date: Thu Jul 26 2001 - 13:52:45 EST


On Thu, 26 Jul 2001, Paul Larson wrote:

> make it up to 980 threads on my machine. Saw this change in fork.c with
> 2.4.7-ac1:
>
> - max_threads = mempages / (THREAD_SIZE/PAGE_SIZE) / 2;
> + max_threads = mempages / (THREAD_SIZE/PAGE_SIZE) / 16;
>
> Any reason why this was done?

The old default was to allow up to HALF of the system's memory to
be allocated in task structs. Since each task will also want things
like page tables, mm_struct, vma's, etc. it was pretty easy to just
about KILL a system using nothing but a simple fork bomb, or some
other thing running out of hand.

The new default is to set the limit to something safe enough to
not run the system completely out of swappable memory. This should
protect the system in extreme situations.

If the system administrator wants more tasks in the system, (s)he
can always raise the limit in /proc/sys/kernel/threads-max

regards,

Rik

--
Executive summary of a recent Microsoft press release:
   "we are concerned about the GNU General Public License (GPL)"

http://www.surriel.com/ http://www.conectiva.com/ http://distro.conectiva.com/

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Jul 31 2001 - 21:00:29 EST