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.3 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 4D934ECE58E for ; Tue, 15 Oct 2019 09:30:34 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 069BF20650 for ; Tue, 15 Oct 2019 09:30:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 069BF20650 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 ACF3D8E0005; Tue, 15 Oct 2019 05:30:33 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A58B08E0001; Tue, 15 Oct 2019 05:30:33 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 91F4D8E0005; Tue, 15 Oct 2019 05:30:33 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 6B5768E0001 for ; Tue, 15 Oct 2019 05:30:33 -0400 (EDT) Received: from smtpin06.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with SMTP id 1B1D0182A0742 for ; Tue, 15 Oct 2019 09:30:33 +0000 (UTC) X-FDA: 76045498746.06.hand54_792fcbf3b0e05 X-HE-Tag: hand54_792fcbf3b0e05 X-Filterd-Recvd-Size: 3606 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf38.hostedemail.com (Postfix) with ESMTP for ; Tue, 15 Oct 2019 09:30:32 +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 9F6E228; Tue, 15 Oct 2019 02:30:31 -0700 (PDT) Received: from [10.162.42.142] (p8cg001049571a15.blr.arm.com [10.162.42.142]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E06EA3F718; Tue, 15 Oct 2019 02:30:22 -0700 (PDT) Subject: Re: + mm-hugetlb-make-alloc_gigantic_page-available-for-general-use.patch added to -mm tree To: Matthew Wilcox , Michal Hocko Cc: akpm@linux-foundation.org, ard.biesheuvel@linaro.org, broonie@kernel.org, christophe.leroy@c-s.fr, dan.j.williams@intel.com, dave.hansen@intel.com, davem@davemloft.net, gerald.schaefer@de.ibm.com, gregkh@linuxfoundation.org, heiko.carstens@de.ibm.com, jgg@ziepe.ca, jhogan@kernel.org, keescook@chromium.org, kirill@shutemov.name, linux@armlinux.org.uk, mark.rutland@arm.com, mike.kravetz@oracle.com, mm-commits@vger.kernel.org, mpe@ellerman.id.au, paul.burton@mips.com, paulus@samba.org, penguin-kernel@i-love.sakura.ne.jp, peterz@infradead.org, ralf@linux-mips.org, rppt@linux.vnet.ibm.com, schowdary@nvidia.com, schwidefsky@de.ibm.com, Steven.Price@arm.com, tglx@linutronix.de, vbabka@suse.cz, vgupta@synopsys.com, yamada.masahiro@socionext.com, linux-mm@kvack.org References: <20191011202932.GZoUOoURm%akpm@linux-foundation.org> <20191014121730.GE317@dhcp22.suse.cz> <20191014202926.GZ32665@bombadil.infradead.org> From: Anshuman Khandual Message-ID: <0bcb05da-5775-99d8-46d9-3140b6e1dd63@arm.com> Date: Tue, 15 Oct 2019 15:00:49 +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: <20191014202926.GZ32665@bombadil.infradead.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit 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 10/15/2019 01:59 AM, Matthew Wilcox wrote: > On Mon, Oct 14, 2019 at 02:17:30PM +0200, Michal Hocko wrote: >> On Fri 11-10-19 13:29:32, Andrew Morton wrote: >>> alloc_gigantic_page() implements an allocation method where it scans over >>> various zones looking for a large contiguous memory block which could not >>> have been allocated through the buddy allocator. A subsequent patch which >>> tests arch page table helpers needs such a method to allocate PUD_SIZE >>> sized memory block. In the future such methods might have other use cases >>> as well. So alloc_gigantic_page() has been split carving out actual >>> memory allocation method and made available via new >>> alloc_gigantic_page_order(). >> >> You are exporting a helper used for hugetlb internally. Is this really >> what is needed? I haven't followed this patchset but don't you simply >> need a generic 1GB allocator? If yes then you should be looking at >> alloc_contig_range. > > He actually doesn't need to allocate any memory at all. All he needs is > the address of a valid contiguous PUD-sized chunk of memory. > We had already discussed about the benefits of allocated memory over synthetic pfn potentially derived from a kernel text symbol. More over we are not adding any new helper or new code for this purpose, but instead just trying to reuse code which is already present. https://lore.kernel.org/linux-mm/1565335998-22553-1-git-send-email-anshuman.khandual@arm.com/T/