Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755448AbbEEDct (ORCPT ); Mon, 4 May 2015 23:32:49 -0400 Received: from g9t5009.houston.hp.com ([15.240.92.67]:56327 "EHLO g9t5009.houston.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752428AbbEEDcg (ORCPT ); Mon, 4 May 2015 23:32:36 -0400 Message-ID: <554839D0.3080703@hp.com> Date: Mon, 04 May 2015 23:32:32 -0400 From: Waiman Long User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.12) Gecko/20130109 Thunderbird/10.0.12 MIME-Version: 1.0 To: Andrew Morton CC: Mel Gorman , Nathan Zimmer , Dave Hansen , Scott Norton , Daniel J Blueman , Linux-MM , LKML Subject: Re: [PATCH 0/13] Parallel struct page initialisation v4 References: <1430231830-7702-1-git-send-email-mgorman@suse.de> <554030D1.8080509@hp.com> <5543F802.9090504@hp.com> <554415B1.2050702@hp.com> <20150504143046.9404c572486caf71bdef0676@linux-foundation.org> In-Reply-To: <20150504143046.9404c572486caf71bdef0676@linux-foundation.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3779 Lines: 81 On 05/04/2015 05:30 PM, Andrew Morton wrote: > On Fri, 01 May 2015 20:09:21 -0400 Waiman Long wrote: > >> On 05/01/2015 06:02 PM, Waiman Long wrote: >>> Bad news! >>> >>> I tried your patch on a 24-TB DragonHawk and got an out of memory >>> panic. The kernel log messages were: >> ... >> >>> [ 81.360287] [] dump_stack+0x68/0x77 >>> [ 81.365942] [] panic+0xb9/0x219 >>> [ 81.371213] [] ? >>> __blocking_notifier_call_chain+0x63/0x80 >>> [ 81.378971] [] __out_of_memory+0x34e/0x350 >>> [ 81.385292] [] out_of_memory+0x5e/0x90 >>> [ 81.391230] [] __alloc_pages_slowpath+0x6be/0x740 >>> [ 81.398219] [] __alloc_pages_nodemask+0x23c/0x250 >>> [ 81.405212] [] kmem_getpages+0x56/0x110 >>> [ 81.411246] [] fallback_alloc+0x164/0x200 >>> [ 81.417474] [] ____cache_alloc_node+0x8d/0x170 >>> [ 81.424179] [] kmem_cache_alloc_trace+0x17b/0x240 >>> [ 81.431169] [] init_memory_block+0x3a/0x110 >>> [ 81.437586] [] memory_dev_init+0xd7/0x13d >>> [ 81.443810] [] driver_init+0x2f/0x37 >>> [ 81.449556] [] do_basic_setup+0x29/0xd5 >>> [ 81.455597] [] ? sched_init_smp+0x140/0x147 >>> [ 81.462015] [] kernel_init_freeable+0x20e/0x297 >>> [ 81.468815] [] ? rest_init+0x80/0x80 >>> [ 81.474565] [] kernel_init+0x9/0xf0 >>> [ 81.480216] [] ret_from_fork+0x58/0x90 >>> [ 81.486156] [] ? rest_init+0x80/0x80 >>> [ 81.492350] ---[ end Kernel panic - not syncing: Out of memory and >>> no killable processes... >>> [ 81.492350] >>> >>> -Longman >> I increased the pre-initialized memory per node in update_defer_init() >> of mm/page_alloc.c from 2G to 4G. Now I am able to boot the 24-TB >> machine without error. The 12-TB has 0.75TB/node, while the 24-TB >> machine has 1.5TB/node. I would suggest something like pre-initializing >> 1G per 0.25TB/node. In this way, it will scale properly with the memory >> size. > We're using more than 2G before we've even completed do_basic_setup()? > Where did it all go? I think they may be used in the allocation of the hash tables like: [ 2.367440] Dentry cache hash table entries: 2147483648 (order: 22, 17179869184 bytes) [ 11.522768] Inode-cache hash table entries: 2147483648 (order: 22, 17179869184 bytes) [ 18.598513] Mount-cache hash table entries: 67108864 (order: 17, 536870912 bytes) [ 18.667485] Mountpoint-cache hash table entries: 67108864 (order: 17, 536870912 bytes) The size of those hash tables do scale somewhat linearly with the amount of total memory available. >> Before the patch, the boot time from elilo prompt to ssh login was 694s. >> After the patch, the boot up time was 346s, a saving of 348s (about 50%). > Having to guesstimate the amount of memory which is needed for a > successful boot will be painful. Any number we choose will be wrong > 99% of the time. > > If the kswapd threads have started, all we need to do is to wait: take > a little nap in the allocator's page==NULL slowpath. > > I'm not seeing any reason why we can't start kswapd much earlier - > right at the start of do_basic_setup()? I think we can, we just have to change the hash table allocator to do that. Cheers, Longman -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/