From: David Howells <dhowells@redhat.com>
To: torvalds@osdl.org, akpm@osdl.org
Cc: linux-kernel@vger.kernel.org
Subject: fork pagesize patch
Date: Tue, 16 Nov 2004 15:38:11 +0000 [thread overview]
Message-ID: <20968.1100619491@redhat.com> (raw)
Hi Linus,
You seem to have turned:
+#if THREAD_SIZE >= PAGE_SIZE
max_threads = mempages / (THREAD_SIZE/PAGE_SIZE) / 8;
+#else
+ max_threads = mempages / 8;
+#endif
+
Into:
if (THREAD_SIZE >= PAGE_SIZE)
max_threads = mempages / (THREAD_SIZE/PAGE_SIZE) / 8;
else
max_threads = mempages / 8;
Please don't do that. What you've done causes a divide-by-zero error to be
emitted by the compiler if PAGE_SIZE > THREAD_SIZE. That's why I used the
preprocessor in the first place.
On FRV arch the minimum page size the MMU permits (when there is an MMU) is
16KB; however, that's rather a lot of stack space for the kernel, so I only
allocate half that.
David
next reply other threads:[~2004-11-16 15:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-16 15:38 David Howells [this message]
2004-11-16 16:02 ` fork pagesize patch Linus Torvalds
2004-11-16 16:11 ` David Howells
2004-11-16 16:40 ` Linus Torvalds
2004-11-16 16:58 ` David Howells
2004-11-16 17:11 ` Linus Torvalds
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=20968.1100619491@redhat.com \
--to=dhowells@redhat.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.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 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.