From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-vk0-f72.google.com (mail-vk0-f72.google.com [209.85.213.72]) by kanga.kvack.org (Postfix) with ESMTP id 232E06B0005 for ; Thu, 28 Jun 2018 13:30:26 -0400 (EDT) Received: by mail-vk0-f72.google.com with SMTP id e185-v6so469629vkf.19 for ; Thu, 28 Jun 2018 10:30:26 -0700 (PDT) Received: from userp2130.oracle.com (userp2130.oracle.com. [156.151.31.86]) by mx.google.com with ESMTPS id g76-v6si2559565vke.199.2018.06.28.10.30.24 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Jun 2018 10:30:24 -0700 (PDT) From: Pavel Tatashin Subject: [PATCH v1 0/2] sparse_init rewrite Date: Thu, 28 Jun 2018 13:30:08 -0400 Message-Id: <20180628173010.23849-1-pasha.tatashin@oracle.com> Sender: owner-linux-mm@kvack.org List-ID: To: steven.sistare@oracle.com, daniel.m.jordan@oracle.com, linux-kernel@vger.kernel.org, akpm@linux-foundation.org, kirill.shutemov@linux.intel.com, mhocko@suse.com, linux-mm@kvack.org, dan.j.williams@intel.com, jack@suse.cz, jglisse@redhat.com, jrdr.linux@gmail.com, bhe@redhat.com, gregkh@linuxfoundation.org, vbabka@suse.cz, richard.weiyang@gmail.com, dave.hansen@intel.com, rientjes@google.com, mingo@kernel.org In sparse_init() we allocate two large buffers to temporary hold usemap and memmap for the whole machine. However, we can avoid doing that if we changed sparse_init() to operated on per-node bases instead of doing it on the whole machine beforehand. As shown by Baoquan http://lkml.kernel.org/r/20180628062857.29658-1-bhe@redhat.com The buffers are large enough to cause machine stop to boot on small memory systems. These patches should be applied on top of Baoquan's work, as CONFIG_SPARSEMEM_ALLOC_MEM_MAP_TOGETHER is removed in that work. For the ease of review, I split this work so the first patch only adds new interfaces, the second patch enables them, and removes the old ones. Pavel Tatashin (2): mm/sparse: add sparse_init_nid() mm/sparse: start using sparse_init_nid(), and remove old code include/linux/mm.h | 9 +- mm/sparse-vmemmap.c | 44 ++++--- mm/sparse.c | 285 ++++++++++++++------------------------------ 3 files changed, 125 insertions(+), 213 deletions(-) -- 2.18.0