Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261731AbTK2Kk3 (ORCPT ); Sat, 29 Nov 2003 05:40:29 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261872AbTK2Kk3 (ORCPT ); Sat, 29 Nov 2003 05:40:29 -0500 Received: from dbl.q-ag.de ([80.146.160.66]:48278 "EHLO dbl.q-ag.de") by vger.kernel.org with ESMTP id S261731AbTK2KkY (ORCPT ); Sat, 29 Nov 2003 05:40:24 -0500 Message-ID: <3FC87770.1080400@colorfullife.com> Date: Sat, 29 Nov 2003 11:39:44 +0100 From: Manfred Spraul User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.1) Gecko/20031030 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Jack Steiner CC: Jes Sorensen , linux-kernel@vger.kernel.org, anton@samba.org, "Martin J. Bligh" , William Lee Irwin III , Andrew Morton Subject: Re: hash table sizes Content-Type: multipart/mixed; boundary="------------090003080206090602010503" Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org This is a multi-part message in MIME format. --------------090003080206090602010503 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit What about the attached patch? - add command line overrides for the hash tables sizes. It's impossible to guess if the system is used as a HPC or as a file server. Doc update missing. - limit the dcache hash to 8 mio entries, and the inode hash to 1 mio entries, regardless of the amount of memory in the system. The system admin can override the defaults at boot time if needed. - distribute the memory allocations that happen during boot to all nodes - the memory will be touched by all cpus, binding all allocs to the boot node is wrong. The patch compiles, but is untested due to lack of hardware. -- Manfred --------------090003080206090602010503 Content-Type: text/plain; name="patch-numa" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="patch-numa" // $Header$ // Kernel Version: // VERSION = 2 // PATCHLEVEL = 6 // SUBLEVEL = 0 // EXTRAVERSION = -test11 --- 2.6/mm/page_alloc.c 2003-11-29 09:46:35.000000000 +0100 +++ build-2.6/mm/page_alloc.c 2003-11-29 11:34:04.000000000 +0100 @@ -681,6 +681,42 @@ EXPORT_SYMBOL(__alloc_pages); +#ifdef CONFIG_NUMA +/* Early boot: Everything is done by one cpu, but the data structures will be + * used by all cpus - spread them on all nodes. + */ +static __init unsigned long get_boot_pages(unsigned int gfp_mask, unsigned int order) +{ +static int nodenr; + int i = nodenr; + struct page *page; + + for (;;) { + if (i > nodenr + numnodes) + return 0; + if (node_present_pages(i%numnodes)) { + struct zone **z; + /* The node contains memory. Check that there is + * memory in the intended zonelist. + */ + z = NODE_DATA(i%numnodes)->node_zonelists[gfp_mask & GFP_ZONEMASK].zones; + while (*z) { + if ( (*z)->free_pages > (1UL<