From: Dave McCracken <dmccr@us.ibm.com>
To: Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Issue with max_threads (and other resources) and highmem
Date: Tue, 23 Oct 2001 15:19:45 -0500 [thread overview]
Message-ID: <72940000.1003868385@baldur> (raw)
I recently had pointed out to me that the default value for max_threads (ie
the max number of tasks per system) doesn't work right on machines with
lots of memory.
A quick examination of fork_init() shows that max_threads is supposed to be
limited so its stack/task_struct takes no more than half of physical
memory. This calculation ignores the fact that task_structs must be
allocated from the normal pool and not the highmem pool, which is a clear
bug. On a machine with enough physical memory it's possible for all of
normal memory to be allocated to task_structs, which tends to make the
machine die.
fork_init() gets its knowledge of physical memory passed in from
start_kernel(), which sets it from mum_physpages. This parameter is also
passed to several other init functions.
My question boils down to this... Should we change start_kernel() to limit
the physical memory size it passes to the init functions to not include
high memory, or should we only do it for fork_init()? What is the best way
to do calculate this number? I don't see any simple way in
architecture-independent code to get the size of high memory vs normal
memory.
What's the best approach here?
Thanks,
Dave McCracken
======================================================================
Dave McCracken IBM Linux Base Kernel Team 1-512-838-3059
dmccr@us.ibm.com T/L 678-3059
next reply other threads:[~2001-10-23 20:21 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-10-23 20:19 Dave McCracken [this message]
2001-10-23 20:36 ` Issue with max_threads (and other resources) and highmem Andi Kleen
2001-10-23 20:46 ` Dave McCracken
2001-10-23 20:52 ` Rik van Riel
2001-10-23 21:05 ` Dave McCracken
2001-10-23 21:59 ` Rik van Riel
2001-10-23 23:30 Dan Kegel
2001-10-23 23:35 ` Rik van Riel
2001-10-24 0:00 ` Dan Kegel
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=72940000.1003868385@baldur \
--to=dmccr@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).