From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752120AbdI1JIz (ORCPT ); Thu, 28 Sep 2017 05:08:55 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:34130 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751082AbdI1JIx (ORCPT ); Thu, 28 Sep 2017 05:08:53 -0400 X-Google-Smtp-Source: AOwi7QDObfjZBMcc5ZZf+x8AZvGuHwL2i7ep6ZeMO9XVI/upFJKVIb4kU6AGedf+LZTPRDXrmcxrvA== Date: Thu, 28 Sep 2017 12:08:50 +0300 From: "Kirill A. Shutemov" To: Ingo Molnar Cc: "Kirill A. Shutemov" , Ingo Molnar , Linus Torvalds , x86@kernel.org, Thomas Gleixner , "H. Peter Anvin" , Andrew Morton , Andy Lutomirski , Cyrill Gorcunov , Borislav Petkov , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCHv7 01/19] mm/sparsemem: Allocate mem_section at runtime for SPARSEMEM_EXTREME Message-ID: <20170928090850.oed4ls6ojpbjpkcp@node.shutemov.name> References: <20170918105553.27914-1-kirill.shutemov@linux.intel.com> <20170918105553.27914-2-kirill.shutemov@linux.intel.com> <20170928080711.3msbrmwluqwfhjkg@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170928080711.3msbrmwluqwfhjkg@gmail.com> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 28, 2017 at 10:07:11AM +0200, Ingo Molnar wrote: > > * Kirill A. Shutemov wrote: > > > Size of mem_section array depends on size of physical address space. > > > > In preparation for boot-time switching between paging modes on x86-64 > > we need to make allocation of mem_section dynamic. > > > > The patch allocates the array on the first call to > > sparse_memory_present_with_active_regions(). > > > > Signed-off-by: Kirill A. Shutemov > > What is the size of the allocations here, in bytes, for the two main variants? For 4-level paging it's 32k. For 5-level paging it's 2M. -- Kirill A. Shutemov