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.1 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, 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 D19C2C4CECE for ; Mon, 14 Oct 2019 20:30:00 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 92BB6217D9 for ; Mon, 14 Oct 2019 20:30:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="PGaK0nvV" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 92BB6217D9 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 2DCB18E0007; Mon, 14 Oct 2019 16:30:00 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 2B52D8E0001; Mon, 14 Oct 2019 16:30:00 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1CADF8E0007; Mon, 14 Oct 2019 16:30:00 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0107.hostedemail.com [216.40.44.107]) by kanga.kvack.org (Postfix) with ESMTP id EE8C88E0001 for ; Mon, 14 Oct 2019 16:29:59 -0400 (EDT) Received: from smtpin10.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with SMTP id 9BFAC180ACF61 for ; Mon, 14 Oct 2019 20:29:59 +0000 (UTC) X-FDA: 76043531718.10.fifth93_9168b89e28615 X-HE-Tag: fifth93_9168b89e28615 X-Filterd-Recvd-Size: 3655 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf50.hostedemail.com (Postfix) with ESMTP for ; Mon, 14 Oct 2019 20:29:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=u+wWV/GhPCh0iflr72NhnZlJSHpL1oewrl/e2ZFP784=; b=PGaK0nvV32mkTH96zgvt3l3uI /wXnR7r53Ckd1PkKL+MuXOkS3FqYtcJmXD0WAupxX5ILeNYmCF9UabqP+TmmgTfDNTkVgxJ9JaKUr L6YB6zNnEeJTlmu3SDWvqHzE4qnHLzuI9fkyoZu3yLxyTnHB3yaDWkVvmvScSxfWdrhXbhSdKCiEj b4XIdLXJk9ErddoAmfUwd8LlTDAH98SZBRtE+A751Qw3Aq8Lqs1bGaWDCxd11dZCoBXR+2sqIi+EI ImZOfHKf2JykqsGnERyH/V12iUFWSJPeKwX8NH0Rhqub80vqP0MIOUjNGVXavP5RGs2DsJoePq4U/ 5zHmAaT3Q==; Received: from willy by bombadil.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1iK6y6-0008Go-JM; Mon, 14 Oct 2019 20:29:26 +0000 Date: Mon, 14 Oct 2019 13:29:26 -0700 From: Matthew Wilcox To: Michal Hocko Cc: akpm@linux-foundation.org, anshuman.khandual@arm.com, 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 Subject: Re: + mm-hugetlb-make-alloc_gigantic_page-available-for-general-use.patch added to -mm tree Message-ID: <20191014202926.GZ32665@bombadil.infradead.org> References: <20191011202932.GZoUOoURm%akpm@linux-foundation.org> <20191014121730.GE317@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191014121730.GE317@dhcp22.suse.cz> User-Agent: Mutt/1.12.1 (2019-06-15) 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 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.