From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B5068C433DB for ; Thu, 11 Feb 2021 08:01:52 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4A90E64E77 for ; Thu, 11 Feb 2021 08:01:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4A90E64E77 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id BFE216B008A; Thu, 11 Feb 2021 03:01:51 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id BAE6E6B008C; Thu, 11 Feb 2021 03:01:51 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AEB2D6B0092; Thu, 11 Feb 2021 03:01:51 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0053.hostedemail.com [216.40.44.53]) by kanga.kvack.org (Postfix) with ESMTP id 983C46B008A for ; Thu, 11 Feb 2021 03:01:51 -0500 (EST) Received: from smtpin19.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 64E2C1EE6 for ; Thu, 11 Feb 2021 08:01:51 +0000 (UTC) X-FDA: 77805243222.19.lip16_38039fc27617 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin19.hostedemail.com (Postfix) with ESMTP id 413561AD1B4 for ; Thu, 11 Feb 2021 08:01:51 +0000 (UTC) X-HE-Tag: lip16_38039fc27617 X-Filterd-Recvd-Size: 2630 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by imf23.hostedemail.com (Postfix) with ESMTP for ; Thu, 11 Feb 2021 08:01:50 +0000 (UTC) Received: by verein.lst.de (Postfix, from userid 2407) id 7E66068B02; Thu, 11 Feb 2021 09:01:48 +0100 (CET) Date: Thu, 11 Feb 2021 09:01:48 +0100 From: Christoph Hellwig To: Anshuman Khandual Cc: linux-mm@kvack.org, linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com, akpm@linux-foundation.org, will@kernel.org, Robin Murphy , Marek Szyprowski , Christoph Hellwig , David Hildenbrand , Mark Rutland , iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/3] arm64/hugetlb: Enable HUGETLB_PAGE_SIZE_VARIABLE Message-ID: <20210211080148.GB14448@lst.de> References: <1613024531-19040-1-git-send-email-anshuman.khandual@arm.com> <1613024531-19040-3-git-send-email-anshuman.khandual@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1613024531-19040-3-git-send-email-anshuman.khandual@arm.com> User-Agent: Mutt/1.5.17 (2007-11-01) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Thu, Feb 11, 2021 at 11:52:10AM +0530, Anshuman Khandual wrote: > MAX_ORDER which invariably depends on FORCE_MAX_ZONEORDER can be a variable > for a given page size, depending on whether TRANSPARENT_HUGEPAGE is enabled > or not. In certain page size and THP combinations HUGETLB_PAGE_ORDER can be > greater than MAX_ORDER, making it unusable as pageblock_order. > > This enables HUGETLB_PAGE_SIZE_VARIABLE making pageblock_order a variable > rather than the compile time constant HUGETLB_PAGE_ORDER which could break > MAX_ORDER rule for certain configurations. > > Cc: Catalin Marinas > Cc: Will Deacon > Cc: linux-arm-kernel@lists.infradead.org > Cc: linux-kernel@vger.kernel.org > Signed-off-by: Anshuman Khandual > --- > arch/arm64/Kconfig | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig > index f39568b28ec1..8e3a5578f663 100644 > --- a/arch/arm64/Kconfig > +++ b/arch/arm64/Kconfig > @@ -1909,6 +1909,10 @@ config ARCH_ENABLE_THP_MIGRATION > def_bool y > depends on TRANSPARENT_HUGEPAGE > > +config HUGETLB_PAGE_SIZE_VARIABLE Please move the definition of HUGETLB_PAGE_SIZE_VARIABLE to mm/Kconfig and select it from the arch Kconfigfs instead of duplicating the definition.