From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262023AbUKPPjc (ORCPT ); Tue, 16 Nov 2004 10:39:32 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262020AbUKPPjP (ORCPT ); Tue, 16 Nov 2004 10:39:15 -0500 Received: from mx1.redhat.com ([66.187.233.31]:1990 "EHLO mx1.redhat.com") by vger.kernel.org with ESMTP id S262019AbUKPPiS (ORCPT ); Tue, 16 Nov 2004 10:38:18 -0500 From: David Howells To: torvalds@osdl.org, akpm@osdl.org cc: linux-kernel@vger.kernel.org Subject: fork pagesize patch User-Agent: EMH/1.14.1 SEMI/1.14.5 (Awara-Onsen) FLIM/1.14.5 (Demachiyanagi) APEL/10.6 Emacs/21.3 (i386-redhat-linux-gnu) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.5 - "Awara-Onsen") Content-Type: text/plain; charset=US-ASCII Date: Tue, 16 Nov 2004 15:38:11 +0000 Message-ID: <20968.1100619491@redhat.com> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org 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