mm: Don't use CMA pages for writes

If CMA pages are used for writes, the writes may not complete
fast enough for CMA to be allocated within a reasonable amount
of time. If we get a CMA page, get another one to use instead.

Change-Id: I19d8ba655da7525d68d5947337d500566998971c
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
This commit is contained in:
Laura Abbott
2012-11-29 16:22:01 -08:00
committed by Stephen Boyd
parent d4c6e690a5
commit 24c697b28a

View File

@@ -2343,9 +2343,17 @@ repeat:
if (page) if (page)
goto found; goto found;
retry:
page = __page_cache_alloc(gfp_mask & ~gfp_notmask); page = __page_cache_alloc(gfp_mask & ~gfp_notmask);
if (!page) if (!page)
return NULL; return NULL;
if (is_cma_pageblock(page)) {
__free_page(page);
gfp_notmask |= __GFP_MOVABLE;
goto retry;
}
status = add_to_page_cache_lru(page, mapping, index, status = add_to_page_cache_lru(page, mapping, index,
GFP_KERNEL & ~gfp_notmask); GFP_KERNEL & ~gfp_notmask);
if (unlikely(status)) { if (unlikely(status)) {