From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp1.linux-foundation.org (smtp1.linux-foundation.org [140.211.169.13]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "smtp.linux-foundation.org", Issuer "CA Cert Signing Authority" (verified OK)) by ozlabs.org (Postfix) with ESMTPS id D5A73DDE0E for ; Tue, 18 Nov 2008 08:32:51 +1100 (EST) Date: Mon, 17 Nov 2008 13:31:37 -0800 From: Andrew Morton To: Linus Torvalds Subject: Re: Large stack usage in fs code (especially for PPC64) Message-Id: <20081117133137.616cf287.akpm@linux-foundation.org> In-Reply-To: References: <20081117130856.92e41cd3.akpm@linux-foundation.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, rostedt@goodmis.org, linuxppc-dev@ozlabs.org, paulus@samba.org, mingo@elte.hu, tglx@linutronix.de List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Mon, 17 Nov 2008 13:23:23 -0800 (PST) Linus Torvalds wrote: > > > On Mon, 17 Nov 2008, Andrew Morton wrote: > > > > Far be it from me to apportion blame, but THIS IS ALL LINUS'S FAULT!!!!! :) > > > > I fixed this six years ago. See http://lkml.org/lkml/2002/6/17/68 > > Btw, in that thread I also said: > > "If we have 64kB pages, such architectures will have to have a bigger > kernel stack. Which they will have, simply by virtue of having the very > same bigger page. So that problem kind of solves itself." > > and that may still be the "right" solution - if somebody is so insane that > they want 64kB pages, then they might as well have a 64kB kernel stack as > well. I'd have thought so, but I'm sure we're about to hear how important an optimisation the smaller stacks are ;) > Trust me, the kernel stack isn't where you blow your memory with a 64kB > page. You blow all your memory on the memory fragmentation of your page > cache. I did the stats for the kernel source tree a long time ago, and I > think you wasted something like 4GB of RAM with a 64kB page size. > Yup. That being said, the younger me did assert that "this is a neater implementation anyway". If we can implement those loops without needing those on-stack temporary arrays then things probably are better overall. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754621AbYKQVdK (ORCPT ); Mon, 17 Nov 2008 16:33:10 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752355AbYKQVc5 (ORCPT ); Mon, 17 Nov 2008 16:32:57 -0500 Received: from smtp1.linux-foundation.org ([140.211.169.13]:49792 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751279AbYKQVc4 (ORCPT ); Mon, 17 Nov 2008 16:32:56 -0500 Date: Mon, 17 Nov 2008 13:31:37 -0800 From: Andrew Morton To: Linus Torvalds Cc: rostedt@goodmis.org, linux-kernel@vger.kernel.org, paulus@samba.org, benh@kernel.crashing.org, linuxppc-dev@ozlabs.org, mingo@elte.hu, tglx@linutronix.de, linux-mm@kvack.org Subject: Re: Large stack usage in fs code (especially for PPC64) Message-Id: <20081117133137.616cf287.akpm@linux-foundation.org> In-Reply-To: References: <20081117130856.92e41cd3.akpm@linux-foundation.org> X-Mailer: Sylpheed version 2.2.4 (GTK+ 2.8.20; i486-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 17 Nov 2008 13:23:23 -0800 (PST) Linus Torvalds wrote: > > > On Mon, 17 Nov 2008, Andrew Morton wrote: > > > > Far be it from me to apportion blame, but THIS IS ALL LINUS'S FAULT!!!!! :) > > > > I fixed this six years ago. See http://lkml.org/lkml/2002/6/17/68 > > Btw, in that thread I also said: > > "If we have 64kB pages, such architectures will have to have a bigger > kernel stack. Which they will have, simply by virtue of having the very > same bigger page. So that problem kind of solves itself." > > and that may still be the "right" solution - if somebody is so insane that > they want 64kB pages, then they might as well have a 64kB kernel stack as > well. I'd have thought so, but I'm sure we're about to hear how important an optimisation the smaller stacks are ;) > Trust me, the kernel stack isn't where you blow your memory with a 64kB > page. You blow all your memory on the memory fragmentation of your page > cache. I did the stats for the kernel source tree a long time ago, and I > think you wasted something like 4GB of RAM with a 64kB page size. > Yup. That being said, the younger me did assert that "this is a neater implementation anyway". If we can implement those loops without needing those on-stack temporary arrays then things probably are better overall. From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Mon, 17 Nov 2008 13:31:37 -0800 From: Andrew Morton Subject: Re: Large stack usage in fs code (especially for PPC64) Message-Id: <20081117133137.616cf287.akpm@linux-foundation.org> In-Reply-To: References: <20081117130856.92e41cd3.akpm@linux-foundation.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org Return-Path: To: Linus Torvalds Cc: rostedt@goodmis.org, linux-kernel@vger.kernel.org, paulus@samba.org, benh@kernel.crashing.org, linuxppc-dev@ozlabs.org, mingo@elte.hu, tglx@linutronix.de, linux-mm@kvack.org List-ID: On Mon, 17 Nov 2008 13:23:23 -0800 (PST) Linus Torvalds wrote: > > > On Mon, 17 Nov 2008, Andrew Morton wrote: > > > > Far be it from me to apportion blame, but THIS IS ALL LINUS'S FAULT!!!!! :) > > > > I fixed this six years ago. See http://lkml.org/lkml/2002/6/17/68 > > Btw, in that thread I also said: > > "If we have 64kB pages, such architectures will have to have a bigger > kernel stack. Which they will have, simply by virtue of having the very > same bigger page. So that problem kind of solves itself." > > and that may still be the "right" solution - if somebody is so insane that > they want 64kB pages, then they might as well have a 64kB kernel stack as > well. I'd have thought so, but I'm sure we're about to hear how important an optimisation the smaller stacks are ;) > Trust me, the kernel stack isn't where you blow your memory with a 64kB > page. You blow all your memory on the memory fragmentation of your page > cache. I did the stats for the kernel source tree a long time ago, and I > think you wasted something like 4GB of RAM with a 64kB page size. > Yup. That being said, the younger me did assert that "this is a neater implementation anyway". If we can implement those loops without needing those on-stack temporary arrays then things probably are better overall. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org