ANDROID: mm: cma do not sleep for __GFP_NORETRY

Do not sleep for retrying for __GFP_NORERY since it's failfast
mode approach. User could retry the allocation without the flag
by themselves if they see the failure.

Bug: 192475091
Signed-off-by: Minchan Kim <minchan@google.com>
Change-Id: Ic6a857978fda8e353b9ed770d1e0ba1808fd201e
This commit is contained in:
Minchan Kim
2021-07-13 08:56:06 -07:00
committed by Todd Kjos
parent 0e688e972d
commit 12f48605e8

View File

@@ -477,7 +477,8 @@ struct page *cma_alloc(struct cma *cma, size_t count, unsigned int align,
if ((num_attempts < max_retries) && (ret == -EBUSY)) {
mutex_unlock(&cma->lock);
if (fatal_signal_pending(current))
if (fatal_signal_pending(current) ||
(gfp_mask & __GFP_NORETRY))
break;
/*