From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.codeaurora.org by pdx-caf-mail.web.codeaurora.org (Dovecot) with LMTP id HBvDG/KuGVtrQgAAmS7hNA ; Thu, 07 Jun 2018 22:17:22 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 5EA546089E; Thu, 7 Jun 2018 22:17:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.0 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by smtp.codeaurora.org (Postfix) with ESMTP id D9D13602FC; Thu, 7 Jun 2018 22:17:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org D9D13602FC Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752178AbeFGWRT (ORCPT + 25 others); Thu, 7 Jun 2018 18:17:19 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:37184 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751607AbeFGWRS (ORCPT ); Thu, 7 Jun 2018 18:17:18 -0400 Received: from akpm3.svl.corp.google.com (unknown [104.133.9.92]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 6BDE1480; Thu, 7 Jun 2018 22:17:18 +0000 (UTC) Date: Thu, 7 Jun 2018 15:17:17 -0700 From: Andrew Morton To: Baoquan He Cc: linux-kernel@vger.kernel.org, dave.hansen@intel.com, pagupta@redhat.com, linux-mm@kvack.org, kirill.shutemov@linux.intel.com Subject: Re: [PATCH v4 0/4] mm/sparse: Optimize memmap allocation during sparse_init() Message-Id: <20180607151717.618eea26c03c124c79ad50d0@linux-foundation.org> In-Reply-To: <20180521101555.25610-1-bhe@redhat.com> References: <20180521101555.25610-1-bhe@redhat.com> X-Mailer: Sylpheed 3.6.0 (GTK+ 2.24.31; x86_64-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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 21 May 2018 18:15:51 +0800 Baoquan He wrote: > This is v4 post. V3 can be found here: > https://lkml.org/lkml/2018/2/27/928 > > V1 can be found here: > https://www.spinics.net/lists/linux-mm/msg144486.html > > In sparse_init(), two temporary pointer arrays, usemap_map and map_map > are allocated with the size of NR_MEM_SECTIONS. They are used to store > each memory section's usemap and mem map if marked as present. In > 5-level paging mode, this will cost 512M memory though they will be > released at the end of sparse_init(). System with few memory, like > kdump kernel which usually only has about 256M, will fail to boot > because of allocation failure if CONFIG_X86_5LEVEL=y. > > In this patchset, optimize the memmap allocation code to only use > usemap_map and map_map with the size of nr_present_sections. This > makes kdump kernel boot up with normal crashkernel='' setting when > CONFIG_X86_5LEVEL=y. We're still a bit short on review input for this series. Hi, Dave!