Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit aae482fc authored by Liam Mark's avatar Liam Mark
Browse files

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: default avatarLiam Mark <lmark@codeaurora.org>
parent f6f026ce
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -239,8 +239,13 @@ static inline struct page *page_cache_alloc_cold(struct address_space *x)

static inline gfp_t readahead_gfp_mask(struct address_space *x)
{
	return mapping_gfp_mask(x) |
	gfp_t gfp_mask = mapping_gfp_mask(x) |
				__GFP_COLD | __GFP_NORETRY | __GFP_NOWARN;

	if (gfp_mask & __GFP_MOVABLE)
		gfp_mask |= __GFP_CMA;

	return gfp_mask;
}

typedef int filler_t(struct file *, struct page *);