public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] [rmap] upper limit on wait table size
@ 2002-02-17 10:20 William Lee Irwin III
  0 siblings, 0 replies; only message in thread
From: William Lee Irwin III @ 2002-02-17 10:20 UTC (permalink / raw)
  To: linux-kernel; +Cc: riel

[-- Attachment #1: brief message --]
[-- Type: text/plain, Size: 1401 bytes --]

# This is a BitKeeper generated patch for the following project:
# Project Name: Long-term Linux VM development
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
#	           ChangeSet	1.201   ->        
#	     mm/page_alloc.c	1.60    -> 1.61   
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 02/02/17	wli@holomorphy.com	1.202
# Set upper limits on the maximum number of waitqueue table entries.
# --------------------------------------------
#
diff -Nru a/mm/page_alloc.c b/mm/page_alloc.c
--- a/mm/page_alloc.c	Sun Feb 17 02:15:31 2002
+++ b/mm/page_alloc.c	Sun Feb 17 02:15:31 2002
@@ -825,6 +825,22 @@
 	while(size < pages)
 		size <<= 1;
 
+	/*
+	 * 16384 blocked kernel threads seems like a reasonable
+	 * number and this throttles the growth of the wait table
+	 * to something bounded above by something resembling
+	 * approximately the maximum number of kernel threads
+	 * expected. This limit will trigger at 16K*4K*256 = 16GB
+	 * on i386. The hard upper bound for i386 is then
+	 * 16K*12B = 192KB, which is large but acceptable. For
+	 * uniprocessor machines 4096 threads is a more likely
+	 * number. i386 UP triggers this at 4GB for a 48KB table.
+	 */
+	if (NR_CPUS > 1)
+		size = min(size, 16384UL);
+	else
+		size = min(size, 4096UL);
+
 	return size;
 }
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-02-17 10:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-02-17 10:20 [PATCH] [rmap] upper limit on wait table size William Lee Irwin III

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox