From: William Lee Irwin III <wli@holomorphy.com>
To: linux-kernel@vger.kernel.org
Cc: riel@surriel.com
Subject: [PATCH] [rmap] upper limit on wait table size
Date: Sun, 17 Feb 2002 02:20:13 -0800 [thread overview]
Message-ID: <20020217102013.GG832@holomorphy.com> (raw)
[-- 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;
}
reply other threads:[~2002-02-17 10:20 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20020217102013.GG832@holomorphy.com \
--to=wli@holomorphy.com \
--cc=linux-kernel@vger.kernel.org \
--cc=riel@surriel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.