mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-09-21 20:04:01 +00:00
mm: Retry original migrate type if CMA failed
Currently, __rmqueue_cma will disregard the original migrate type and only try MIGRATE_CMA for allocations. If the MIGRATE_CMA allocation fails, the fallback types of the original migrate type are used. Note that in this current path we never try to actually allocate from the original migrate type. If the only pages left in the system are the original migrate type, we will fail the allocation since we never actually try the original migrate type. This may lead to infinite looping since the system still (correctly) calculates there are pages available for allocation and will keep trying to allocate pages. Fix this degenerate case by allocating from the original migrate type if the MIGRATE_CMA allocation fails. Change-Id: I62ab293dc694955eaf88e790131a8565395ba8cb CRs-Fixed: 470615 Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
This commit is contained in:
parent
bbeb52955d
commit
54089f1c73
1 changed files with 1 additions and 1 deletions
|
@ -1138,7 +1138,7 @@ static struct page *__rmqueue_cma(struct zone *zone, unsigned int order,
|
|||
#ifdef CONFIG_CMA
|
||||
if (migratetype == MIGRATE_MOVABLE && !zone->cma_alloc)
|
||||
page = __rmqueue_smallest(zone, order, MIGRATE_CMA);
|
||||
else
|
||||
if (!page)
|
||||
#endif
|
||||
retry_reserve :
|
||||
page = __rmqueue_smallest(zone, order, migratetype);
|
||||
|
|
Loading…
Reference in a new issue