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. 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=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,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 87463C433E1 for ; Wed, 24 Jun 2020 09:47:57 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 542422088E for ; Wed, 24 Jun 2020 09:47:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="w1YXkwC4" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 542422088E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=JmRkVvesFf48W6ecWM+CUQ5J8I4Syh9D0AeM/GBP5Ag=; b=w1YXkwC4DRcXKNpvz+SdlS1M1 U9u1sZJw5muhI2Mo8ltIKWZI1rwypdS8Z3iHZC21hz8O0hD9sNUYzeemZknzNwdCk062/59TXdpGz Yk0Kg7RO+U8UQJ7f1pGReCvVvVd3ovcEF29xopn/hIbRumiMREC4Jv9oCj2YtR9e+3q1eoSInQiHc iX3+uRs0XTONmdmlb+pSw+zDmbA9ruLxwjSEiNAvZKFxG5lii2bi0mYC4NUbf6zyn2C62Z3ARKJ0Q nlVUchxiTHfPck+AchE8pyv/Ni0nRyC0P8/KV2XLKIfWYclzluWemzvy1mCtCcA6v4DFzI/w0zz5r AFUhBlgZA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jo1yi-00044m-Jj; Wed, 24 Jun 2020 09:46:00 +0000 Received: from foss.arm.com ([217.140.110.172]) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jo1ye-00043d-Hv for linux-arm-kernel@lists.infradead.org; Wed, 24 Jun 2020 09:45:57 +0000 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 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-Language: en-GB X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Barry Song , kbuild-all@lists.01.org, Catalin Marinas , Andrew Morton , Will Deacon , linux-arm-kernel@lists.infradead.org, Mike Kravetz Content-Transfer-Encoding: base64 Content-Type: text/plain; charset="utf-8"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org T24gMjAyMC0wNi0yNCAwMToxNywgQW5zaHVtYW4gS2hhbmR1YWwgd3JvdGU6Cj4gCj4gCj4gT24g MDYvMjMvMjAyMCAxMDoxMCBQTSwgUm9iaW4gTXVycGh5IHdyb3RlOgo+PiBPbiAyMDIwLTA2LTIz IDEzOjQ4LCBBbnNodW1hbiBLaGFuZHVhbCB3cm90ZToKPj4+Cj4+PiBPbiAwNi8yMy8yMDIwIDAy OjU0IFBNLCBrZXJuZWwgdGVzdCByb2JvdCB3cm90ZToKPj4+PiAgwqDCoMKgIDQyM8KgwqDCoMKg wqDCoMKgIC8qCj4+Pj4gIMKgwqDCoCA0MjTCoMKgwqDCoMKgwqDCoMKgICogbXVzdCBiZSBkb25l IGFmdGVyIGFybTY0X251bWFfaW5pdCgpIHdoaWNoIGNhbGxzIG51bWFfaW5pdCgpIHRvCj4+Pj4g IMKgwqDCoCA0MjXCoMKgwqDCoMKgwqDCoMKgICogaW5pdGlhbGl6ZSBub2RlX29ubGluZV9tYXAg dGhhdCBnZXRzIHVzZWQgaW4gaHVnZXRsYl9jbWFfcmVzZXJ2ZSgpCj4+Pj4gIMKgwqDCoCA0MjbC oMKgwqDCoMKgwqDCoMKgICogd2hpbGUgYWxsb2NhdGluZyByZXF1aXJlZCBDTUEgc2l6ZSBhY3Jv c3Mgb25saW5lIG5vZGVzLgo+Pj4+ICDCoMKgwqAgNDI3wq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bml0aW9uIGluIGFuIGFsd2F5cy1yZWFjaGFibGUgCmhlYWRl ciwgKm9yKiBpbmxpbmUgI2lmZGVmcyBhcm91bmQgdGhlIGNhbGxlci4gTWl4aW5nIGJvdGggc3Vj aCB0aGF0IAp0aGVyZSBhcmUgMyBvciA0IHBvc3NpYmxlIGNvbWJpbmF0aW9ucyBqdXN0IGlzbid0 IG5pY2UgdG8gbWFpbnRhaW4uCgpSb2Jpbi4KCl9fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fCmxpbnV4LWFybS1rZXJuZWwgbWFpbGluZyBsaXN0CmxpbnV4LWFy bS1rZXJuZWxAbGlzdHMuaW5mcmFkZWFkLm9yZwpodHRwOi8vbGlzdHMuaW5mcmFkZWFkLm9yZy9t YWlsbWFuL2xpc3RpbmZvL2xpbnV4LWFybS1rZXJuZWwK From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============2910733217983967092==" MIME-Version: 1.0 From: Robin Murphy To: kbuild-all@lists.01.org Subject: Re: [PATCH] arm64/hugetlb: Reserve CMA areas for gigantic pages on 16K and 64K configs Date: Wed, 24 Jun 2020 10:45:52 +0100 Message-ID: <63be846e-7e61-39f7-e3f3-9a61cb50e44c@arm.com> In-Reply-To: List-Id: --===============2910733217983967092== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable On 2020-06-24 01:17, Anshuman Khandual wrote: > = > = > 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_hugetlb_= 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 that = you can pick up the stub definition reliably. > = > 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 = wouldn't need tweaking - the point I was trying to get at is that it's = preferable to have *either* a stub definition in an always-reachable = header, *or* inline #ifdefs around the caller. Mixing both such that = there are 3 or 4 possible combinations just isn't nice to maintain. Robin. --===============2910733217983967092==--