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=-2.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no 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 7FF30C433DF for ; Wed, 24 Jun 2020 09:45:58 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 47C1320885 for ; Wed, 24 Jun 2020 09:45:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 47C1320885 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id A6BCE6B0008; Wed, 24 Jun 2020 05:45:57 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A1C9E6B000A; Wed, 24 Jun 2020 05:45:57 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 90B2C6B000C; Wed, 24 Jun 2020 05:45:57 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0056.hostedemail.com [216.40.44.56]) by kanga.kvack.org (Postfix) with ESMTP id 797CC6B0008 for ; Wed, 24 Jun 2020 05:45:57 -0400 (EDT) Received: from smtpin26.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 1AEEC180AD837 for ; Wed, 24 Jun 2020 09:45:57 +0000 (UTC) X-FDA: 76963623954.26.boot40_030620d26e43 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin26.hostedemail.com (Postfix) with ESMTP id E25F71804B660 for ; Wed, 24 Jun 2020 09:45:56 +0000 (UTC) X-HE-Tag: boot40_030620d26e43 X-Filterd-Recvd-Size: 3273 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf22.hostedemail.com (Postfix) with ESMTP for ; Wed, 24 Jun 2020 09:45:56 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 7D3641FB; Wed, 24 Jun 2020 02:45:55 -0700 (PDT) Received: from [10.57.9.128] (unknown [10.57.9.128]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D8A0A3F6CF; Wed, 24 Jun 2020 02:45:53 -0700 (PDT) Subject: Re: [PATCH] arm64/hugetlb: Reserve CMA areas for gigantic pages on 16K and 64K configs To: Anshuman Khandual , kernel test robot , linux-mm@kvack.org Cc: Mark Rutland , Barry Song , kbuild-all@lists.01.org, Catalin Marinas , Andrew Morton , Will Deacon , linux-arm-kernel@lists.infradead.org, Mike Kravetz References: <1592893296-22040-1-git-send-email-anshuman.khandual@arm.com> <202006231703.DC6xDVaw%lkp@intel.com> <65df396e-1345-eb86-48cf-ee9bbd3881f4@arm.com> From: Robin Murphy Message-ID: <63be846e-7e61-39f7-e3f3-9a61cb50e44c@arm.com> Date: Wed, 24 Jun 2020 10:45:52 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB X-Rspamd-Queue-Id: E25F71804B660 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam02 Content-Transfer-Encoding: quoted-printable 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 2020-06-24 01:17, Anshuman Khandual wrote: >=20 >=20 > On 06/23/2020 10:10 PM, Robin Murphy wrote: >> On 2020-06-23 13:48, Anshuman Khandual wrote: >>> >>> On 06/23/2020 02:54 PM, kernel test robot wrote: >>>> =C2=A0=C2=A0=C2=A0 423=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 /* >>>> =C2=A0=C2=A0=C2=A0 424=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 * must be done after arm64_numa_init() which calls numa_init() to >>>> =C2=A0=C2=A0=C2=A0 425=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 * initialize node_online_map that gets used in hugetlb_cma_reserve() >>>> =C2=A0=C2=A0=C2=A0 426=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 * while allocating required CMA size across online nodes. >>>> =C2=A0=C2=A0=C2=A0 427=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 */ >>>> =C2=A0 > 428=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 arm64_hugetl= b_cma_reserve(); >>> >>> Wrapping this call site with CONFIG_HUGETLB_PAGE solves the problem. >> >> ...although it might be nicer to include asm/hugetlb.h directly so tha= t you can pick up the stub definition reliably. >=20 > Including directly does not solve the problem and > is no better. arm64_hugetlb_cma_reserve() needs > protection wrt both CMA and HUGETLB_PAGE. Dropped HUGETLB_PAGE > assuming it should have been taken care as the stub itself was in > , which turns out to be not true. Sure, I wasn't suggesting that the implementation of the header itself=20 wouldn't need tweaking - the point I was trying to get at is that it's=20 preferable to have *either* a stub definition in an always-reachable=20 header, *or* inline #ifdefs around the caller. Mixing both such that=20 there are 3 or 4 possible combinations just isn't nice to maintain. Robin.