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 8E610C10F14 for ; Tue, 15 Oct 2019 11:07:18 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 57D98218DE for ; Tue, 15 Oct 2019 11:07:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 57D98218DE 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 0244B8E0005; Tue, 15 Oct 2019 07:07:18 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id EF0138E0001; Tue, 15 Oct 2019 07:07:17 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DB7538E0005; Tue, 15 Oct 2019 07:07:17 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0084.hostedemail.com [216.40.44.84]) by kanga.kvack.org (Postfix) with ESMTP id B56678E0001 for ; Tue, 15 Oct 2019 07:07:17 -0400 (EDT) Received: from smtpin15.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with SMTP id 4BAB41808BB45 for ; Tue, 15 Oct 2019 11:07:17 +0000 (UTC) X-FDA: 76045742514.15.pets15_5c64cf30c3257 X-HE-Tag: pets15_5c64cf30c3257 X-Filterd-Recvd-Size: 4656 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf16.hostedemail.com (Postfix) with ESMTP for ; Tue, 15 Oct 2019 11:07:14 +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 0FCDE28; Tue, 15 Oct 2019 04:07:14 -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 D3D3B3F68E; Tue, 15 Oct 2019 04:07:00 -0700 (PDT) Subject: Re: [PATCH V6 1/2] mm/page_alloc: Make alloc_gigantic_page() available for general use To: Michal Hocko Cc: linux-mm@kvack.org, Andrew Morton , Vlastimil Babka , Greg Kroah-Hartman , Thomas Gleixner , Mike Rapoport , Mike Kravetz , Jason Gunthorpe , Dan Williams , Peter Zijlstra , Mark Rutland , Mark Brown , Steven Price , Ard Biesheuvel , Masahiro Yamada , Kees Cook , Tetsuo Handa , Matthew Wilcox , Sri Krishna chowdary , Dave Hansen , Russell King - ARM Linux , Michael Ellerman , Paul Mackerras , Martin Schwidefsky , Heiko Carstens , "David S. Miller" , Vineet Gupta , James Hogan , Paul Burton , Ralf Baechle , "Kirill A . Shutemov" , Gerald Schaefer , Christophe Leroy , David Rientjes , Andrea Arcangeli , Oscar Salvador , Mel Gorman , linux-snps-arc@lists.infradead.org, linux-mips@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-ia64@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, x86@kernel.org, linux-kernel@vger.kernel.org References: <1571131302-32290-1-git-send-email-anshuman.khandual@arm.com> <1571131302-32290-2-git-send-email-anshuman.khandual@arm.com> <20191015104521.GY317@dhcp22.suse.cz> From: Anshuman Khandual Message-ID: <2d4e7b28-67bf-baf3-b8a0-a5b3a58e3b31@arm.com> Date: Tue, 15 Oct 2019 16:37:27 +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: <20191015104521.GY317@dhcp22.suse.cz> 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 04:15 PM, Michal Hocko wrote: > On Tue 15-10-19 14:51:41, Anshuman Khandual wrote: > [...] >> +/** >> + * alloc_gigantic_page_order() -- tries to allocate given order of pages >> + * @order: allocation order (greater than MAX_ORDER) >> + * @gfp_mask: GFP mask to use during compaction >> + * @nid: allocation node >> + * @nodemask: allocation nodemask >> + * >> + * This routine is an wrapper around alloc_contig_range() which scans over >> + * all zones on an applicable zonelist to find a contiguous pfn range which >> + * can the be allocated with alloc_contig_range(). This routine is intended >> + * to be used for allocations greater than MAX_ORDER. >> + * >> + * Return: page on success or NULL on failure. On success a memory block >> + * of 'order' starting with 'page' has been allocated successfully. Memory >> + * allocated here needs to be freed with free_contig_range(). >> + */ >> +struct page *alloc_gigantic_page_order(unsigned int order, gfp_t gfp_mask, >> + int nid, nodemask_t *nodemask) > > One of the objections when Mike has proposed a similar thing last year > was that the interface shouldn't be order bases > http://lkml.kernel.org/r/20180423000943.GO17484@dhcp22.suse.cz > > Order based API makes sense for the buddy allocator but why should we > restrict sizes like that for an allocator that is capable to allocate > arbitrary page sized requests? Fair enough, will change it. Anyways we calculate nr_pages from the order argument at the very beginning. 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 5E08AECE588 for ; Tue, 15 Oct 2019 11:09:33 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (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 C26C8217F9 for ; Tue, 15 Oct 2019 11:09:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C26C8217F9 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 46st3s6VP6zDqgj for ; Tue, 15 Oct 2019 22:09:29 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=arm.com (client-ip=217.140.110.172; helo=foss.arm.com; envelope-from=anshuman.khandual@arm.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=arm.com Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lists.ozlabs.org (Postfix) with ESMTP id 46st1K4zs1zDqWK for ; Tue, 15 Oct 2019 22:07:16 +1100 (AEDT) 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 0FCDE28; Tue, 15 Oct 2019 04:07:14 -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 D3D3B3F68E; Tue, 15 Oct 2019 04:07:00 -0700 (PDT) Subject: Re: [PATCH V6 1/2] mm/page_alloc: Make alloc_gigantic_page() available for general use To: Michal Hocko References: <1571131302-32290-1-git-send-email-anshuman.khandual@arm.com> <1571131302-32290-2-git-send-email-anshuman.khandual@arm.com> <20191015104521.GY317@dhcp22.suse.cz> From: Anshuman Khandual Message-ID: <2d4e7b28-67bf-baf3-b8a0-a5b3a58e3b31@arm.com> Date: Tue, 15 Oct 2019 16:37:27 +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: <20191015104521.GY317@dhcp22.suse.cz> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , linux-ia64@vger.kernel.org, linux-sh@vger.kernel.org, Peter Zijlstra , James Hogan , Tetsuo Handa , Heiko Carstens , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Dave Hansen , Paul Mackerras , sparclinux@vger.kernel.org, Thomas Gleixner , Andrea Arcangeli , linux-s390@vger.kernel.org, x86@kernel.org, Russell King - ARM Linux , Matthew Wilcox , Steven Price , Jason Gunthorpe , Gerald Schaefer , David Rientjes , linux-snps-arc@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Kees Cook , Masahiro Yamada , linuxppc-dev@lists.ozlabs.org, Mark Brown , "Kirill A . Shutemov" , Dan Williams , Vlastimil Babka , Oscar Salvador , Sri Krishna chowdary , Ard Biesheuvel , Greg Kroah-Hartman , linux-mips@vger.kernel.org, Ralf Baechle , Paul Burton , Mike Rapoport , Vineet Gupta , Martin Schwidefsky , Andrew Morton , Mel Gorman , "David S. Miller" , Mike Kravetz Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On 10/15/2019 04:15 PM, Michal Hocko wrote: > On Tue 15-10-19 14:51:41, Anshuman Khandual wrote: > [...] >> +/** >> + * alloc_gigantic_page_order() -- tries to allocate given order of pages >> + * @order: allocation order (greater than MAX_ORDER) >> + * @gfp_mask: GFP mask to use during compaction >> + * @nid: allocation node >> + * @nodemask: allocation nodemask >> + * >> + * This routine is an wrapper around alloc_contig_range() which scans over >> + * all zones on an applicable zonelist to find a contiguous pfn range which >> + * can the be allocated with alloc_contig_range(). This routine is intended >> + * to be used for allocations greater than MAX_ORDER. >> + * >> + * Return: page on success or NULL on failure. On success a memory block >> + * of 'order' starting with 'page' has been allocated successfully. Memory >> + * allocated here needs to be freed with free_contig_range(). >> + */ >> +struct page *alloc_gigantic_page_order(unsigned int order, gfp_t gfp_mask, >> + int nid, nodemask_t *nodemask) > > One of the objections when Mike has proposed a similar thing last year > was that the interface shouldn't be order bases > http://lkml.kernel.org/r/20180423000943.GO17484@dhcp22.suse.cz > > Order based API makes sense for the buddy allocator but why should we > restrict sizes like that for an allocator that is capable to allocate > arbitrary page sized requests? Fair enough, will change it. Anyways we calculate nr_pages from the order argument at the very beginning. 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=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 B8A1CC10F14 for ; Tue, 15 Oct 2019 11:07:27 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 6E13521848 for ; Tue, 15 Oct 2019 11:07:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ZxVUr4qY" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6E13521848 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-snps-arc-bounces+linux-snps-arc=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.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=9wDKA+TjWxOnu8oL3dQVx5F+KHbPP47/o0sT9f4VQ8k=; b=ZxVUr4qYvFk/cO npqL8FdBZ0P1wa/cHL/Gpwy45U/d7hWztKkfzH4VbmQZ3hr8QIvHh57tJLAc0uK85FI7gta1JTx0s tHW0xXnuurdAORijcYdr0lVKvH2lv7HoUMJOJJu1Y0FcWXFZ+m11px3OGgKwmVBD4PsPpASMyO9Ne YuyLmfv7DpX2bIR83GeaTLVPh7//cXCSpgDDvgH0wVWP5VaGmPLyvE5WmSf43H1UD8l5yG3qw73uZ GeZEM/S+LM+H73jNv3URCX6NKhEW5s2DsW0+8TquOmJsUSnqDzdvaH+HZFs1x5WkGQxKeuKEgJnOf AatS0Gaq5yAguj39rOKw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iKKfl-0004wO-G2; Tue, 15 Oct 2019 11:07:25 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iKKfb-0004mm-2t; Tue, 15 Oct 2019 11:07:16 +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 0FCDE28; Tue, 15 Oct 2019 04:07:14 -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 D3D3B3F68E; Tue, 15 Oct 2019 04:07:00 -0700 (PDT) Subject: Re: [PATCH V6 1/2] mm/page_alloc: Make alloc_gigantic_page() available for general use To: Michal Hocko References: <1571131302-32290-1-git-send-email-anshuman.khandual@arm.com> <1571131302-32290-2-git-send-email-anshuman.khandual@arm.com> <20191015104521.GY317@dhcp22.suse.cz> From: Anshuman Khandual Message-ID: <2d4e7b28-67bf-baf3-b8a0-a5b3a58e3b31@arm.com> Date: Tue, 15 Oct 2019 16:37:27 +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: <20191015104521.GY317@dhcp22.suse.cz> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191015_040715_212938_3B1891AC X-CRM114-Status: GOOD ( 15.53 ) X-BeenThere: linux-snps-arc@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on Synopsys ARC Processors List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , linux-ia64@vger.kernel.org, linux-sh@vger.kernel.org, Peter Zijlstra , James Hogan , Tetsuo Handa , Heiko Carstens , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Dave Hansen , Paul Mackerras , sparclinux@vger.kernel.org, Thomas Gleixner , Andrea Arcangeli , linux-s390@vger.kernel.org, Michael Ellerman , x86@kernel.org, Russell King - ARM Linux , Matthew Wilcox , Steven Price , Jason Gunthorpe , Gerald Schaefer , David Rientjes , linux-snps-arc@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Kees Cook , Masahiro Yamada , linuxppc-dev@lists.ozlabs.org, Mark Brown , "Kirill A . Shutemov" , Dan Williams , Vlastimil Babka , Oscar Salvador , Christophe Leroy , Sri Krishna chowdary , Ard Biesheuvel , Greg Kroah-Hartman , linux-mips@vger.kernel.org, Ralf Baechle , Paul Burton , Mike Rapoport , Vineet Gupta , Martin Schwidefsky , Andrew Morton , Mel Gorman , "David S. Miller" , Mike Kravetz Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-snps-arc" Errors-To: linux-snps-arc-bounces+linux-snps-arc=archiver.kernel.org@lists.infradead.org On 10/15/2019 04:15 PM, Michal Hocko wrote: > On Tue 15-10-19 14:51:41, Anshuman Khandual wrote: > [...] >> +/** >> + * alloc_gigantic_page_order() -- tries to allocate given order of pages >> + * @order: allocation order (greater than MAX_ORDER) >> + * @gfp_mask: GFP mask to use during compaction >> + * @nid: allocation node >> + * @nodemask: allocation nodemask >> + * >> + * This routine is an wrapper around alloc_contig_range() which scans over >> + * all zones on an applicable zonelist to find a contiguous pfn range which >> + * can the be allocated with alloc_contig_range(). This routine is intended >> + * to be used for allocations greater than MAX_ORDER. >> + * >> + * Return: page on success or NULL on failure. On success a memory block >> + * of 'order' starting with 'page' has been allocated successfully. Memory >> + * allocated here needs to be freed with free_contig_range(). >> + */ >> +struct page *alloc_gigantic_page_order(unsigned int order, gfp_t gfp_mask, >> + int nid, nodemask_t *nodemask) > > One of the objections when Mike has proposed a similar thing last year > was that the interface shouldn't be order bases > http://lkml.kernel.org/r/20180423000943.GO17484@dhcp22.suse.cz > > Order based API makes sense for the buddy allocator but why should we > restrict sizes like that for an allocator that is capable to allocate > arbitrary page sized requests? Fair enough, will change it. Anyways we calculate nr_pages from the order argument at the very beginning. _______________________________________________ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc 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=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 916F9ECE58F for ; Tue, 15 Oct 2019 11:07:18 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 619BF21848 for ; Tue, 15 Oct 2019 11:07:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="WqQEfx/j" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 619BF21848 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+infradead-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=bombadil.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=+kbgSvmj8V5qX+2BaDg8mAfSeQ2ycGrru1Bc3nHDaho=; b=WqQEfx/j75Z/Nq 76lpZxSQ1oG6C07XJnLqL9W8cYjK87Glnv4ujij/y/AmsDdMiSahw3s1WWDBau+K1YTeN5ivByEPk E3YkdDbb8RtyDcFSb3Nv5GurbdrDW4qhdm0L5py6xg3g2QT7twC8TjoJwFjPMUgzsYlJzVaYgbDa8 wV+MMa5eYIDj/8CNh0M9imqTAj6S4FYgOnWNAH0owmevpSZ1qQGlokSVEKxLH34igv3wbQ7N2jGML Mij0oFr4BS7WBhkDL3p+pCwZlZdNIjXofatrso7lAy5mGVJZIQybu2t9IyIijrWQkiiEft6mxi+N+ gL0Ppxv1FDJE3dryWmkw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iKKfd-0004nB-Vl; Tue, 15 Oct 2019 11:07:17 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iKKfb-0004mm-2t; Tue, 15 Oct 2019 11:07:16 +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 0FCDE28; Tue, 15 Oct 2019 04:07:14 -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 D3D3B3F68E; Tue, 15 Oct 2019 04:07:00 -0700 (PDT) Subject: Re: [PATCH V6 1/2] mm/page_alloc: Make alloc_gigantic_page() available for general use To: Michal Hocko References: <1571131302-32290-1-git-send-email-anshuman.khandual@arm.com> <1571131302-32290-2-git-send-email-anshuman.khandual@arm.com> <20191015104521.GY317@dhcp22.suse.cz> From: Anshuman Khandual Message-ID: <2d4e7b28-67bf-baf3-b8a0-a5b3a58e3b31@arm.com> Date: Tue, 15 Oct 2019 16:37:27 +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: <20191015104521.GY317@dhcp22.suse.cz> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191015_040715_212938_3B1891AC X-CRM114-Status: GOOD ( 15.53 ) 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 , linux-ia64@vger.kernel.org, linux-sh@vger.kernel.org, Peter Zijlstra , James Hogan , Tetsuo Handa , Heiko Carstens , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Dave Hansen , Paul Mackerras , sparclinux@vger.kernel.org, Thomas Gleixner , Andrea Arcangeli , linux-s390@vger.kernel.org, Michael Ellerman , x86@kernel.org, Russell King - ARM Linux , Matthew Wilcox , Steven Price , Jason Gunthorpe , Gerald Schaefer , David Rientjes , linux-snps-arc@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Kees Cook , Masahiro Yamada , linuxppc-dev@lists.ozlabs.org, Mark Brown , "Kirill A . Shutemov" , Dan Williams , Vlastimil Babka , Oscar Salvador , Christophe Leroy , Sri Krishna chowdary , Ard Biesheuvel , Greg Kroah-Hartman , linux-mips@vger.kernel.org, Ralf Baechle , Paul Burton , Mike Rapoport , Vineet Gupta , Martin Schwidefsky , Andrew Morton , Mel Gorman , "David S. Miller" , Mike Kravetz Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 10/15/2019 04:15 PM, Michal Hocko wrote: > On Tue 15-10-19 14:51:41, Anshuman Khandual wrote: > [...] >> +/** >> + * alloc_gigantic_page_order() -- tries to allocate given order of pages >> + * @order: allocation order (greater than MAX_ORDER) >> + * @gfp_mask: GFP mask to use during compaction >> + * @nid: allocation node >> + * @nodemask: allocation nodemask >> + * >> + * This routine is an wrapper around alloc_contig_range() which scans over >> + * all zones on an applicable zonelist to find a contiguous pfn range which >> + * can the be allocated with alloc_contig_range(). This routine is intended >> + * to be used for allocations greater than MAX_ORDER. >> + * >> + * Return: page on success or NULL on failure. On success a memory block >> + * of 'order' starting with 'page' has been allocated successfully. Memory >> + * allocated here needs to be freed with free_contig_range(). >> + */ >> +struct page *alloc_gigantic_page_order(unsigned int order, gfp_t gfp_mask, >> + int nid, nodemask_t *nodemask) > > One of the objections when Mike has proposed a similar thing last year > was that the interface shouldn't be order bases > http://lkml.kernel.org/r/20180423000943.GO17484@dhcp22.suse.cz > > Order based API makes sense for the buddy allocator but why should we > restrict sizes like that for an allocator that is capable to allocate > arbitrary page sized requests? Fair enough, will change it. Anyways we calculate nr_pages from the order argument at the very beginning. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel