pagemap.h: Allow readahead Movable allocations from CMA region

There are a lot of readahead Movable allocations.

These allocations don't appear to get 'pinned' so allow them to be
satisfied from the CMA region in order to better utilize CMA memory.

Change-Id: I87387a748e67a6963b9a526b729e6e273c1cc519
Signed-off-by: Liam Mark <lmark@codeaurora.org>
This commit is contained in:
Liam Mark 2018-09-18 17:00:13 -07:00
commit 999f2ea7d8

View file

@ -223,7 +223,13 @@ static inline struct page *page_cache_alloc(struct address_space *x)
static inline gfp_t readahead_gfp_mask(struct address_space *x)
{
return mapping_gfp_mask(x) | __GFP_NORETRY | __GFP_NOWARN;
gfp_t gfp_mask = mapping_gfp_mask(x) |
__GFP_NORETRY | __GFP_NOWARN;
if (gfp_mask & __GFP_MOVABLE)
gfp_mask |= __GFP_CMA;
return gfp_mask;
}
typedef int filler_t(void *, struct page *);