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

Commit 999f2ea7 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 8b046724
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -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 *);