# Re: \[RFC 0/7\] Support high-order page bulk allocation

- From: Matthew Wilcox \<willy@infradead.org\>
- Date: 2020-08-18 15:58:38 
- List: linux-mm
- Page: https://ratatoskr.run/linux-mm/2020/08/6502694
- Thread: https://ratatoskr.run/linux-mm/2020/08/6502583/t.md

```text
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);


```
