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:
3
mm/cma.c
3
mm/cma.c
@@ -477,7 +477,8 @@ struct page *cma_alloc(struct cma *cma, size_t count, unsigned int align,
|
|||||||
if ((num_attempts < max_retries) && (ret == -EBUSY)) {
|
if ((num_attempts < max_retries) && (ret == -EBUSY)) {
|
||||||
mutex_unlock(&cma->lock);
|
mutex_unlock(&cma->lock);
|
||||||
|
|
||||||
if (fatal_signal_pending(current))
|
if (fatal_signal_pending(current) ||
|
||||||
|
(gfp_mask & __GFP_NORETRY))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Reference in New Issue
Block a user