mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
msm: kgsl: Don't do intensive memory recovery when allocating big pages
We don't want to incur too much overhead when allocating big pages so don't attempt to retry, perform reclaim, or run memory compaction on high-order allocations. Change-Id: Ic0dedbadb354c6faea34abec36aee268ac0f2c34 Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org> Signed-off-by: Ling Wan <lingw@codeaurora.org>
This commit is contained in:
parent
ccc53d6971
commit
fc864f49dc
1 changed files with 9 additions and 3 deletions
|
@ -617,16 +617,22 @@ _kgsl_sharedmem_page_alloc(struct kgsl_memdesc *memdesc,
|
|||
|
||||
while (len > 0) {
|
||||
struct page *page;
|
||||
unsigned int gfp_mask = GFP_KERNEL | __GFP_HIGHMEM |
|
||||
__GFP_NOWARN | __GFP_NORETRY;
|
||||
unsigned int gfp_mask = __GFP_HIGHMEM;
|
||||
int j;
|
||||
|
||||
/* don't waste space at the end of the allocation*/
|
||||
if (len < page_size)
|
||||
page_size = PAGE_SIZE;
|
||||
|
||||
/*
|
||||
* Don't do some of the more aggressive memory recovery
|
||||
* techniques for large order allocations
|
||||
*/
|
||||
if (page_size != PAGE_SIZE)
|
||||
gfp_mask |= __GFP_COMP;
|
||||
gfp_mask |= __GFP_COMP | __GFP_NORETRY |
|
||||
__GFP_NO_KSWAPD | __GFP_NOWARN;
|
||||
else
|
||||
gfp_mask |= GFP_KERNEL | __GFP_NORETRY;
|
||||
|
||||
page = alloc_pages(gfp_mask, get_order(page_size));
|
||||
|
||||
|
|
Loading…
Reference in a new issue