fork_init: update max_threads comment
authorJean Delvare <jdelvare@suse.de>
Thu, 16 Apr 2015 19:47:41 +0000 (12:47 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 17 Apr 2015 13:04:06 +0000 (09:04 -0400)
The comment explaining what value max_threads is set to is outdated.  The
maximum memory consumption ratio for thread structures was 1/2 until
February 2002, then it was briefly changed to 1/16 before being set to 1/8
which we still use today.  The comment was never updated to reflect that
change, it's about time.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/fork.c

index d778016..c507e29 100644 (file)
@@ -270,8 +270,8 @@ void __init fork_init(unsigned long mempages)
 
        /*
         * The default maximum number of threads is set to a safe
-        * value: the thread structures can take up at most half
-        * of memory.
+        * value: the thread structures can take up at most one
+        * eighth of the memory.
         */
        max_threads = mempages / (8 * THREAD_SIZE / PAGE_SIZE);