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 3BC05C433DF for ; Wed, 24 Jun 2020 00:17:47 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 001B92078E for ; Wed, 24 Jun 2020 00:17:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 001B92078E 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 6D3D26B0002; Tue, 23 Jun 2020 20:17:46 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 684826B0003; Tue, 23 Jun 2020 20:17:46 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 599356B0005; Tue, 23 Jun 2020 20:17:46 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0163.hostedemail.com [216.40.44.163]) by kanga.kvack.org (Postfix) with ESMTP id 407C46B0002 for ; Tue, 23 Jun 2020 20:17:46 -0400 (EDT) Received: from smtpin15.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id C29CD1EE6 for ; Wed, 24 Jun 2020 00:17:45 +0000 (UTC) X-FDA: 76962192090.15.team15_5216e1026e3f Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin15.hostedemail.com (Postfix) with ESMTP id 93EA41814B0C1 for ; Wed, 24 Jun 2020 00:17:45 +0000 (UTC) X-HE-Tag: team15_5216e1026e3f X-Filterd-Recvd-Size: 2761 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf11.hostedemail.com (Postfix) with ESMTP for ; Wed, 24 Jun 2020 00:17:45 +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 38F261F1; Tue, 23 Jun 2020 17:17:44 -0700 (PDT) Received: from [10.163.82.47] (unknown [10.163.82.47]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 8431C3F73C; Tue, 23 Jun 2020 17:17:40 -0700 (PDT) Subject: Re: [PATCH] arm64/hugetlb: Reserve CMA areas for gigantic pages on 16K and 64K configs To: Robin Murphy , 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: Anshuman Khandual Message-ID: Date: Wed, 24 Jun 2020 05:47:30 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <65df396e-1345-eb86-48cf-ee9bbd3881f4@arm.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US X-Rspamd-Queue-Id: 93EA41814B0C1 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam05 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 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. >=20 > ...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. 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,URIBL_BLOCKED,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 89302C433E0 for ; Wed, 24 Jun 2020 00:19:30 +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 5488A2078E for ; Wed, 24 Jun 2020 00:19:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="LtVyjuy3" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5488A2078E 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-Transfer-Encoding: Content-Type: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=KwMTkJRmNWK1wVQ4h6jbFdZ1S1JEbuEqlOJvaJLfLKs=; b=LtVyjuy3vcI912XvQG+EV6xRt ThatjRm43AwEqOd7PlHlxI3O9GyCAlsymnm5EgWzeSWkL+iCj8RHJPdTyTFxqYDunxubx46j2oXFH k7/FVHiLIi179ZsW0IDA0cj5v1xojFSlSyuRkvmMk4uMErVuy6Q6zZd1R7uCOFOCqv2NBTepIVwGo +uORjI7DWlNdxTGk8sv/bTHyfPaO0vQE41LTa0gAyJkvQPtfsKsWn/VgN3YSgKl5NIS+fx8g5GGO0 11JPYtw67ll9i1dGophXFvNhrAfTqf1eqOcDmZhs9p0YQ5R6NX1pGYIp4Ar2iX5jqxpPc6EeYSIm2 aMgEtykTw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnt6q-0001IO-8P; Wed, 24 Jun 2020 00:17:48 +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 1jnt6m-0001HX-Kf for linux-arm-kernel@lists.infradead.org; Wed, 24 Jun 2020 00:17:45 +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 38F261F1; Tue, 23 Jun 2020 17:17:44 -0700 (PDT) Received: from [10.163.82.47] (unknown [10.163.82.47]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 8431C3F73C; Tue, 23 Jun 2020 17:17:40 -0700 (PDT) Subject: Re: [PATCH] arm64/hugetlb: Reserve CMA areas for gigantic pages on 16K and 64K configs To: Robin Murphy , 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: Anshuman Khandual Message-ID: Date: Wed, 24 Jun 2020 05:47:30 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <65df396e-1345-eb86-48cf-ee9bbd3881f4@arm.com> Content-Language: en-US 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-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org CgpPbiAwNi8yMy8yMDIwIDEwOjEwIFBNLCBSb2JpbiBNdXJwaHkgd3JvdGU6Cj4gT24gMjAyMC0w Ni0yMyAxMzo0OCwgQW5zaHVtYW4gS2hhbmR1YWwgd3JvdGU6Cj4+Cj4+IE9uIDA2LzIzLzIwMjAg MDI6NTQgUE0sIGtlcm5lbCB0ZXN0IHJvYm90IHdyb3RlOgo+Pj4gwqDCoMKgIDQyM8KgwqDCoMKg wqDCoMKgIC8qCj4+PiDCoMKgwqAgNDI0wqDCoMKgwqDCoMKgwqDCoCAqIG11c3QgYmUgZG9uZSBh ZnRlciBhcm02NF9udW1hX2luaXQoKSB3aGljaCBjYWxscyBudW1hX2luaXQoKSB0bwo+Pj4gwqDC oMKgIDQyNcKgwqDCoMKgwqDCoMKgwqAgKiBpbml0aWFsaXplIG5vZGVfb25saW5lX21hcCB0aGF0 IGdldHMgdXNlZCBpbiBodWdldGxiX2NtYV9yZXNlcnZlKCkKPj4+IMKgwqDCoCA0MjbCoMKgwqDC oMKgwqDCoMKgICogd2hpbGUgYWxsb2NhdGluZyByZXF1aXJlZCBDTUEgc2l6ZSBhY3Jvc3Mgb25s aW5lIG5vZGVzLgo+Pj4gwqDCoMKgIDQyN8KgwqDCoMKgwqDCoMKgwqAgKi8KPj4+IMKgID4gNDI4 wqDCoMKgwqDCoMKgwqAgYXJtNjRfaHVnZXRsYl9jbWFfcmVzZXJ2ZSgpOwo+Pgo+PiBXcmFwcGlu ZyB0aGlzIGNhbGwgc2l0ZSB3aXRoIENPTkZJR19IVUdFVExCX1BBR0Ugc29sdmVzIHRoZSBwcm9i bGVtLgo+IAo+IC4uLmFsdGhvdWdoIGl0IG1pZ2h0IGJlIG5pY2VyIHRvIGluY2x1ZGUgYXNtL2h1 Z2V0bGIuaCBkaXJlY3RseSBzbyB0aGF0IHlvdSBjYW4gcGljayB1cCB0aGUgc3R1YiBkZWZpbml0 aW9uIHJlbGlhYmx5LgoKSW5jbHVkaW5nIDxhc20vaHVnZXRsYi5oPiBkaXJlY3RseSBkb2VzIG5v dCBzb2x2ZSB0aGUgcHJvYmxlbSBhbmQKPGxpbnV4L2h1Z2V0bGIuaD4gaXMgbm8gYmV0dGVyLiBh cm02NF9odWdldGxiX2NtYV9yZXNlcnZlKCkgbmVlZHMKcHJvdGVjdGlvbiB3cnQgYm90aCBDTUEg YW5kIEhVR0VUTEJfUEFHRS4gRHJvcHBlZCBIVUdFVExCX1BBR0UKYXNzdW1pbmcgaXQgc2hvdWxk IGhhdmUgYmVlbiB0YWtlbiBjYXJlIGFzIHRoZSBzdHViIGl0c2VsZiB3YXMgaW4KPGFzbS9odWdl dGxiLmg+LCB3aGljaCB0dXJucyBvdXQgdG8gYmUgbm90IHRydWUuCgpfX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fXwpsaW51eC1hcm0ta2VybmVsIG1haWxpbmcg bGlzdApsaW51eC1hcm0ta2VybmVsQGxpc3RzLmluZnJhZGVhZC5vcmcKaHR0cDovL2xpc3RzLmlu ZnJhZGVhZC5vcmcvbWFpbG1hbi9saXN0aW5mby9saW51eC1hcm0ta2VybmVsCg== From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============3346168326577265471==" MIME-Version: 1.0 From: Anshuman Khandual 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 05:47:30 +0530 Message-ID: In-Reply-To: <65df396e-1345-eb86-48cf-ee9bbd3881f4@arm.com> List-Id: --===============3346168326577265471== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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_cm= a_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 y= ou 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. --===============3346168326577265471==--