Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp284935pxu; Fri, 4 Dec 2020 03:18:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJx6nhKi26K+WP/x/Yx9zfObGbEhi3Snna9mnPVZDPrEcd8bC9VKv67eEk37NuR9N9KaByO+ X-Received: by 2002:a50:d886:: with SMTP id p6mr7258822edj.366.1607080739177; Fri, 04 Dec 2020 03:18:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607080739; cv=none; d=google.com; s=arc-20160816; b=RqsOUm2hlP0GH561QS+7j2NTj5+11M6ECZUzTuVirwTdIlQ5yu5hQLtx+uLWwSgjuW TWlcwFkjQc6mCIsNQiJ94uHeNshJVfS6M8yGffdSKdk2bIzsf4J/lcSjrzbYMAmLp7eD gNtnQDUgKoy0wnQuwT0RyQs6RIbCCi29QsDzTgOP1nr5xfdI8ajM5vsgFthB81oLgL8D PrsRHAN3eYJAVIAOaaUe2kCQ932PCA6mcxDRL8JOGZzo6g/rwG2n7W1csnbUQNlUig/w FwNoZh0cZrupdNkm1eTC4686hS1dUOgBgrMoYJ0bsM/E2STqOWjc7o/mIIMP3orzkNro x0EQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from :dkim-signature:date; bh=nCB3CJHW8PNu8UG00ElEK4rbW7YnIrnIGDE9zBxrav4=; b=HkTlsJGMmH7kq/aAwMZOna8iYTV/cCb6W+aqnrKrChwhbs/qy/faYFdAgvvQyLP7tQ 6Bk6rtkYuNQRTvM3i0SfQU9zD6nWG53qIWsn/ExZCilcQqhQnuq7XvTyfCp+Xg1kg1HR OjxijVodlNQYU0346KUYTskcOVmYuNop54c1EWVaClZn7OOctvxVm/bbINdxQ+GQxzB2 M4s4V6sQmOFyl2Qd7v23Bk7HqapcfFhC/QmQg3EJreUk1JDawoWzt6Kyc3OZA2HS//AB Pc4bcA2kG/BL/i8JGEy09f3Y3WhPhRIWJypV2Eq5xZyQJwetquIoiQ0mxlmahd369221 t0Fw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LWQeM+hq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t22si2667685edq.407.2020.12.04.03.18.36; Fri, 04 Dec 2020 03:18:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LWQeM+hq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387473AbgLDLOe (ORCPT + 99 others); Fri, 4 Dec 2020 06:14:34 -0500 Received: from mail.kernel.org ([198.145.29.99]:56490 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730007AbgLDLOd (ORCPT ); Fri, 4 Dec 2020 06:14:33 -0500 Date: Fri, 4 Dec 2020 11:13:47 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1607080433; bh=enaPqvFSZYwkrwi8cQ39U611krzuHcmjaLAOJCcEdWA=; h=From:To:Cc:Subject:References:In-Reply-To:From; b=LWQeM+hqSApsA1cwu0COKWySugNBlvgRlsWxKmwcwZIuXPNEaFAZInavrkcLxgPBi bNyDR/tLUNP5UdFyuFe9R5Bc5G14yZvSgAfDo1f3rX59sWjLCEy5qrO+c01VZ2pfrJ 1Kng5b0RiV3oufAgQFjIUCwkAJwBsHc5bc4HThK8LADEqHv9aTi1cb24mf/FvNURmR JTmh97mcCHygtuYJVkLTLBc2v8oizzFdE7mXhi9+pfVEHQ+FKgPAET4vWSt+l1SgzE YeBoQtG8uPD8/xaRP5pv4AyQzc+pxUjGMp1fAGm/G05/z1oODBoS3sy+WJYvk2Qela PKBmzxlnQvheA== From: Will Deacon To: Wei Li Cc: catalin.marinas@arm.com, rppt@linux.ibm.com, fengbaopeng2@hisilicon.com, nsaenzjulienne@suse.de, steve.capper@arm.com, song.bao.hua@hisilicon.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, butao@hisilicon.com Subject: Re: [PATCH] arm64: mm: decrease the section size to reduce the memory reserved for the page map Message-ID: <20201204111347.GA844@willie-the-truck> References: <20201204014443.43329-1-liwei213@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201204014443.43329-1-liwei213@huawei.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Dec 04, 2020 at 09:44:43AM +0800, Wei Li wrote: > For the memory hole, sparse memory model that define SPARSEMEM_VMEMMAP > do not free the reserved memory for the page map, decrease the section > size can reduce the waste of reserved memory. > > Signed-off-by: Wei Li > Signed-off-by: Baopeng Feng > Signed-off-by: Xia Qing > --- > arch/arm64/include/asm/sparsemem.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/arm64/include/asm/sparsemem.h b/arch/arm64/include/asm/sparsemem.h > index 1f43fcc79738..8963bd3def28 100644 > --- a/arch/arm64/include/asm/sparsemem.h > +++ b/arch/arm64/include/asm/sparsemem.h > @@ -7,7 +7,7 @@ > > #ifdef CONFIG_SPARSEMEM > #define MAX_PHYSMEM_BITS CONFIG_ARM64_PA_BITS > -#define SECTION_SIZE_BITS 30 > +#define SECTION_SIZE_BITS 27 We chose '30' to avoid running out of bits in the page flags. What changed? With this patch, I can trigger: ./include/linux/mmzone.h:1170:2: error: Allocator MAX_ORDER exceeds SECTION_SIZE #error Allocator MAX_ORDER exceeds SECTION_SIZE if I bump up NR_CPUS and NODES_SHIFT. Will