From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from westrelay02.boulder.ibm.com (westrelay02.boulder.ibm.com [9.17.195.11]) by e31.co.us.ibm.com (8.12.11/8.12.11) with ESMTP id k1LHa2FX023165 for ; Tue, 21 Feb 2006 12:36:02 -0500 Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by westrelay02.boulder.ibm.com (8.12.10/NCO/VERS6.8) with ESMTP id k1LHXcJV243084 for ; Tue, 21 Feb 2006 10:33:39 -0700 Received: from d03av02.boulder.ibm.com (loopback [127.0.0.1]) by d03av02.boulder.ibm.com (8.12.11/8.13.3) with ESMTP id k1LHa1Tf016894 for ; Tue, 21 Feb 2006 10:36:01 -0700 Subject: Re: [PATCH 4/7] ppc64 - Specify amount of kernel memory at boot time From: Dave Hansen In-Reply-To: References: <20060217141552.7621.74444.sendpatchset@skynet.csn.ul.ie> <20060217141712.7621.49906.sendpatchset@skynet.csn.ul.ie> <1140196618.21383.112.camel@localhost.localdomain> Content-Type: text/plain Date: Tue, 21 Feb 2006 09:35:58 -0800 Message-Id: <1140543359.8693.32.camel@localhost.localdomain> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org Return-Path: To: Mel Gorman Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, lhms-devel@lists.sourceforge.net List-ID: On Tue, 2006-02-21 at 14:51 +0000, Mel Gorman wrote: > A new release of patches is a long time away but here is an early draft of > what the above currently looks like. Is this more or less what you were > thinking? I think it may be a bit harder to understand than even the other one. :( In a nutshell, get_zones_info() tries to do too much. Six function arguments should be a big, red, warning light that something is really wrong. Calling a function _info() is another bad sign. It means that you can't discretely describe what it does. Remember, there are 3 distinct tasks here: 1. size the node information from init_node_data[] 2. size the easy reclaim zone based on the boot parameters 3. take holes into account when doing the reclaim zone sizing You don't have to do all of those tasks in one pass. This is not a performance-critical path, so try to be as clear as possible, even if it means an extra run or two through the data. Maybe something like this? ZONE_DMA = all memory in node if (kernelcore was set) while (zone size with holes of ZONE_DMA > kernelcore) move memory into EASYRCLM zholes[DMA] = ... zholes[EASYRCLM] = ... free_area_init_node() Those are all operations I can understand. -- Dave -- 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