public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* fork pagesize patch
@ 2004-11-16 15:38 David Howells
  2004-11-16 16:02 ` Linus Torvalds
  0 siblings, 1 reply; 6+ messages in thread
From: David Howells @ 2004-11-16 15:38 UTC (permalink / raw)
  To: torvalds, akpm; +Cc: linux-kernel


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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2004-11-16 17:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-16 15:38 fork pagesize patch David Howells
2004-11-16 16:02 ` 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

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