RE: Linux 2.4.7-ac1

From: Rik van Riel (
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



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

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to More majordomo info at Please read the FAQ at

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