Re: [PATCH 2/9] mm/page_alloc: Add a bulk page allocator

2021-04-12 Thread Mel Gorman
On Mon, Apr 12, 2021 at 11:59:38AM +0100, Mel Gorman wrote: > > I don't understand this comment. Only alloc_flags_nofragment() sets this > > flag > > and we don't use it here? > > > > It's there as a reminder that there are non-obvious consequences > to ALLOC_NOFRAGMENT that may affect the bulk

Re: [PATCH 2/9] mm/page_alloc: Add a bulk page allocator

2021-04-12 Thread Mel Gorman
On Mon, Apr 12, 2021 at 12:21:42PM +0200, Vlastimil Babka wrote: > > diff --git a/mm/page_alloc.c b/mm/page_alloc.c > > index 8a3e13277e22..eb547470a7e4 100644 > > --- a/mm/page_alloc.c > > +++ b/mm/page_alloc.c > > @@ -4965,6 +4965,124 @@ static inline bool prepare_alloc_pages(gfp_t > >

Re: [PATCH 2/9] mm/page_alloc: Add a bulk page allocator

2021-04-12 Thread Vlastimil Babka
On 3/25/21 12:42 PM, Mel Gorman wrote: > This patch adds a new page allocator interface via alloc_pages_bulk, > and __alloc_pages_bulk_nodemask. A caller requests a number of pages > to be allocated and added to a list. > > The API is not guaranteed to return the requested number of pages and >

Re: [PATCH 2/9] mm/page_alloc: Add a bulk page allocator

2021-03-25 Thread Mel Gorman
On Thu, Mar 25, 2021 at 12:05:25PM +, Matthew Wilcox wrote: > On Thu, Mar 25, 2021 at 11:42:21AM +, Mel Gorman wrote: > > +int __alloc_pages_bulk(gfp_t gfp, int preferred_nid, > > + nodemask_t *nodemask, int nr_pages, > > + struct

Re: [PATCH 2/9] mm/page_alloc: Add a bulk page allocator

2021-03-25 Thread Matthew Wilcox
On Thu, Mar 25, 2021 at 11:42:21AM +, Mel Gorman wrote: > +int __alloc_pages_bulk(gfp_t gfp, int preferred_nid, > + nodemask_t *nodemask, int nr_pages, > + struct list_head *list); > + > +/* Bulk allocate order-0 pages */ > +static inline

[PATCH 2/9] mm/page_alloc: Add a bulk page allocator

2021-03-25 Thread Mel Gorman
This patch adds a new page allocator interface via alloc_pages_bulk, and __alloc_pages_bulk_nodemask. A caller requests a number of pages to be allocated and added to a list. The API is not guaranteed to return the requested number of pages and may fail if the preferred allocation zone has