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=-3.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS 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 3E09BC433DF for ; Tue, 18 Aug 2020 15:58:38 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id F07CA20888 for ; Tue, 18 Aug 2020 15:58:37 +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="g2lQeOPF" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F07CA20888 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 6765C8D001A; Tue, 18 Aug 2020 11:58:37 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 6268D8D000B; Tue, 18 Aug 2020 11:58:37 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 53C1E8D001A; Tue, 18 Aug 2020 11:58:37 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0060.hostedemail.com [216.40.44.60]) by kanga.kvack.org (Postfix) with ESMTP id 3C2458D000B for ; Tue, 18 Aug 2020 11:58:37 -0400 (EDT) Received: from smtpin05.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id DB91B362F for ; Tue, 18 Aug 2020 15:58:36 +0000 (UTC) X-FDA: 77164147032.05.jelly16_6202e6c27020 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin05.hostedemail.com (Postfix) with ESMTP id AA9631801D010 for ; Tue, 18 Aug 2020 15:58:36 +0000 (UTC) X-HE-Tag: jelly16_6202e6c27020 X-Filterd-Recvd-Size: 2784 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf38.hostedemail.com (Postfix) with ESMTP for ; Tue, 18 Aug 2020 15:58:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.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; bh=ILi3uHwErP5o6e4r0Tq/i78LmtpDAdFfJSyRjhd52lA=; b=g2lQeOPFH96ODd7XZ83VKotlau MofT2smjsyTxUJ5JaePLYT45qqr0wY7nuU49yTwaOzxQnzqKKejG+tlEu5qV+rlF24IwtilgRoioq NnzL6Zh3yT3RfA+7lc4839DgnUqlx4botNTERqDW84f40/Frv8wZRoE7R/njTmeyzptWqLFdehGhO vqd3Dp9iwxftWLB/5UZM1xkmqK+olfKK124oozoGCDXMTOxwalbIw0xWxH2SGGqQEEybKPqTMaQCI nwpkc6/OvFTfzEf+rhnjL1YEAfbLgMIfkr9sIg8HXap/m5/AaGtATY3Dmstl4WrJl0p6rKbV+kyKp CYMYoSsA==; Received: from willy by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1k840H-0005tx-PP; Tue, 18 Aug 2020 15:58:25 +0000 Date: Tue, 18 Aug 2020 16:58:25 +0100 From: Matthew Wilcox To: Minchan Kim Cc: David Hildenbrand , Andrew Morton , linux-mm , Joonsoo Kim , Vlastimil Babka , John Dias , Suren Baghdasaryan , pullip.cho@samsung.com, Chris Goldsworthy Subject: Re: [RFC 0/7] Support high-order page bulk allocation Message-ID: <20200818155825.GS17456@casper.infradead.org> References: <20200814173131.2803002-1-minchan@kernel.org> <4e2bd095-b693-9fed-40e0-ab538ec09aaa@redhat.com> <20200817152706.GB3852332@google.com> <20200817163018.GC3852332@google.com> <20200817233442.GD3852332@google.com> <7c07e8cf-6adc-92be-d819-d60a389559d8@redhat.com> <20200818151543.GE3852332@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200818151543.GE3852332@google.com> X-Rspamd-Queue-Id: AA9631801D010 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam02 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 Tue, Aug 18, 2020 at 08:15:43AM -0700, Minchan Kim wrote: > I understand pfn stuff in the API is not pretty but the concept of idea > makes sense to me in that go though the *migratable area* and get possible > order pages with hard effort. It looks like GFP_NORETRY version for > kmem_cache_alloc_bulk. > > How about this? > > int cma_alloc(struct cma *cma, int order, unsigned int nr_elem, struct page **pages); I think that makes a lot more sense as an API. Although I think you want int cma_bulk_alloc(struct cma *cma, unsigned order, unsigned nr_elem, struct page **pages);