Re: [PATCH] MM: clarify effort used in alloc_pages_bulk_*()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Aug 30, 2021 at 08:28:15AM +1000, NeilBrown wrote:
> 
> The alloc_pages_bulk_*() interfaces do not make it clear what degree
> of success can be expected.
> 
> The code appears to allocate at least one page with the same effort as
> alloc_page() when used with the same GFP flags, and then to allocate any
> more only opportunistically.  So a caller should not *expect* to get a
> full allocation, but should not be *surprised* by one either.
> 
> Add text to the comment clarifying this.
> 
> Also fix a bug.  When alloc_pages_bulk_array() is called on an array
> that is partially allocated, the level of effort to get a single page is
> less than when the array was completely unallocated.  This behaviour is
> inconsistent, but now fixed.
> 
> Fixes: 0f87d9d30f21 ("mm/page_alloc: add an array-based interface to the bulk page allocator")
> Signed-off-by: NeilBrown <neilb@xxxxxxx>

Acked-by: Mel Gorman <mgorman@xxxxxxxx>

-- 
Mel Gorman
SUSE Labs



[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux