All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] cma_alloc(), indefinitely retry allocations for -EBUSY failures
@ 2020-09-11 20:54 Chris Goldsworthy
  2020-09-11 21:29 ` Chris Goldsworthy
  0 siblings, 1 reply; 6+ messages in thread
From: Chris Goldsworthy @ 2020-09-11 20:54 UTC (permalink / raw)
  To: linux-kernel; +Cc: Chris Goldsworthy

[PATCH v2] cma_alloc(), indefinitely retry allocations for -EBUSY failures

On mobile devices, failure to allocate from a CMA area constitutes a
functional failure.  Sometimes during CMA allocations, we have observed
that pages in a CMA area allocated through alloc_pages(), that we're trying
to migrate away to make room for a CMA allocation, are temporarily pinned.
This temporary pinning can occur when a process that owns the pinned page
is being forked (the example is explained further in the commit text), or it is
exiting.  This patch addresses this issue by indefinitely retrying allocations
that fail due to a return of -EBUSY.

** This change log was re-sent due to threading issues **

Change log: 

v1: We were performing retries of the allocation a fixed number of times.
Andrew Morton disliked this, as it didn't guarantee that the allocation would
succeed.

https://lkml.org/lkml/2020/8/5/1096
https://lkml.org/lkml/2020/8/21/1490

v2: To address this concern, we switched to retrying indefinitely, as opposed to
doing to retrying  the allocation a limited number of times.

Chris Goldsworthy (1):
  mm: cma: indefinitely retry allocations in cma_alloc

 mm/cma.c | 25 +++++++++++++++++++++++--
 1 file changed, 23 insertions(+), 2 deletions(-)

-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] cma_alloc(), indefinitely retry allocations for -EBUSY failures
  2020-09-11 20:54 [PATCH v2] cma_alloc(), indefinitely retry allocations for -EBUSY failures Chris Goldsworthy
@ 2020-09-11 21:29 ` Chris Goldsworthy
  0 siblings, 0 replies; 6+ messages in thread
From: Chris Goldsworthy @ 2020-09-11 21:29 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux-kernel-owner

On 2020-09-11 13:54, Chris Goldsworthy wrote:
> [PATCH v2] cma_alloc(), indefinitely retry allocations for -EBUSY 
> failures
> 
> On mobile devices, failure to allocate from a CMA area constitutes a
> functional failure.  Sometimes during CMA allocations, we have observed
> that pages in a CMA area allocated through alloc_pages(), that we're 
> trying
> to migrate away to make room for a CMA allocation, are temporarily 
> pinned.
> This temporary pinning can occur when a process that owns the pinned 
> page
> is being forked (the example is explained further in the commit text), 
> or it is
> exiting.  This patch addresses this issue by indefinitely retrying 
> allocations
> that fail due to a return of -EBUSY.
> 
> ** This change log was re-sent due to threading issues **
> 
> Change log:
> 
> v1: We were performing retries of the allocation a fixed number of 
> times.
> Andrew Morton disliked this, as it didn't guarantee that the allocation 
> would
> succeed.
> 
> https://lkml.org/lkml/2020/8/5/1096
> https://lkml.org/lkml/2020/8/21/1490
> 
> v2: To address this concern, we switched to retrying indefinitely, as 
> opposed to
> doing to retrying  the allocation a limited number of times.
> 
> Chris Goldsworthy (1):
>   mm: cma: indefinitely retry allocations in cma_alloc
> 
>  mm/cma.c | 25 +++++++++++++++++++++++--
>  1 file changed, 23 insertions(+), 2 deletions(-)
test
-- 
The Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora 
Forum,
a Linux Foundation Collaborative Project

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v2] cma_alloc(), indefinitely retry allocations for -EBUSY failures
@ 2020-09-11 20:28 Chris Goldsworthy
  0 siblings, 0 replies; 6+ messages in thread
From: Chris Goldsworthy @ 2020-09-11 20:28 UTC (permalink / raw)
  To: linux-kernel; +Cc: Chris Goldsworthy

[PATCH v2] cma_alloc(), indefinitely retry allocations for -EBUSY failures

On mobile devices, failure to allocate from a CMA area constitutes a
functional failure.  Sometimes during CMA allocations, we have observed
that pages in a CMA area allocated through alloc_pages(), that we're trying
to migrate away to make room for a CMA allocation, are temporarily pinned.
This temporary pinning can occur when a process that owns the pinned page
is being forked (the example is explained further in the commit text), or it is
exiting.  This patch addresses this issue by indefinitely retrying allocations
that fail due to a return of -EBUSY.

** This change log was re-sent due to threading issues **

Change log: 

v1: We were performing retries of the allocation a fixed number of times.
Andrew Morton disliked this, as it didn't guarantee that the allocation would
succeed.

https://lkml.org/lkml/2020/8/5/1096
https://lkml.org/lkml/2020/8/21/1490

v2: To address this concern, we switched to retrying indefinitely, as opposed to
doing to retrying  the allocation a limited number of times.

Chris Goldsworthy (1):
  mm: cma: indefinitely retry allocations in cma_alloc

 mm/cma.c | 25 +++++++++++++++++++++++--
 1 file changed, 23 insertions(+), 2 deletions(-)

-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v2] cma_alloc(), indefinitely retry allocations for -EBUSY failures
@ 2020-09-11 20:24 Chris Goldsworthy
  0 siblings, 0 replies; 6+ messages in thread
From: Chris Goldsworthy @ 2020-09-11 20:24 UTC (permalink / raw)
  To: linux-kernel; +Cc: Chris Goldsworthy

On mobile devices, failure to allocate from a CMA area constitutes a
functional failure.  Sometimes during CMA allocations, we have observed
that pages in a CMA area allocated through alloc_pages(), that we're trying
to migrate away to make room for a CMA allocation, are temporarily pinned.
This temporary pinning can occur when a process that owns the pinned page
is being forked (the example is explained further in the commit text), or it is
exiting.  This patch addresses this issue by indefinitely retrying allocations
that fail due to a return of -EBUSY.

** This change log was re-sent due to threading issues **

Change log: 

v1: We were performing retries of the allocation a fixed number of times.
Andrew Morton disliked this, as it didn't guarantee that the allocation would
succeed.

https://lkml.org/lkml/2020/8/5/1096
https://lkml.org/lkml/2020/8/21/1490

v2: To address this concern, we switched to retrying indefinitely, as opposed to
doing to retrying  the allocation a limited number of times.

Chris Goldsworthy (1):
  mm: cma: indefinitely retry allocations in cma_alloc

 mm/cma.c | 25 +++++++++++++++++++++++--
 1 file changed, 23 insertions(+), 2 deletions(-)

-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v2] cma_alloc(), indefinitely retry allocations for -EBUSY failures
       [not found] <06489716814387e7f147cf53d1b185a8@codeaurora.org>
  2020-09-11 19:17 ` Chris Goldsworthy
@ 2020-09-11 19:17 ` Chris Goldsworthy
  1 sibling, 0 replies; 6+ messages in thread
From: Chris Goldsworthy @ 2020-09-11 19:17 UTC (permalink / raw)
  To: akpm
  Cc: linux-mm, linux-arm-msm, linux-kernel, pratikp, pdaly, sudraja,
	iamjoonsoo.kim, linux-arm-msm-owner, Chris Goldsworthy

On mobile devices, failure to allocate from a CMA area constitutes a
functional failure.  Sometimes during CMA allocations, we have observed
that pages in a CMA area allocated through alloc_pages(), that we're trying
to migrate away to make room for a CMA allocation, are temporarily pinned.
This temporary pinning can occur when a process that owns the pinned page
is being forked (the example is explained further in the commit text), or it is
exiting.  This patch addresses this issue by indefinitely retrying allocations
that fail due to a return of -EBUSY.

Change log: 

v1: We were performing retries of the allocation a fixed number of times.
Andrew Morton disliked this, as it didn't guarantee that the allocation would
succeed.

v2: To address this concern, we switched to retrying indefinitely, as opposed to
doing to retrying  the allocation a limited number of times.

Chris Goldsworthy (1):
  mm: cma: indefinitely retry allocations in cma_alloc

 mm/cma.c | 25 +++++++++++++++++++++++--
 1 file changed, 23 insertions(+), 2 deletions(-)

-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v2] cma_alloc(), indefinitely retry allocations for -EBUSY failures
       [not found] <06489716814387e7f147cf53d1b185a8@codeaurora.org>
@ 2020-09-11 19:17 ` Chris Goldsworthy
  2020-09-11 19:17 ` Chris Goldsworthy
  1 sibling, 0 replies; 6+ messages in thread
From: Chris Goldsworthy @ 2020-09-11 19:17 UTC (permalink / raw)
  To: akpm
  Cc: linux-mm, linux-arm-msm, linux-kernel, pratikp, pdaly, sudraja,
	iamjoonsoo.kim, linux-arm-msm-owner, Chris Goldsworthy

On mobile devices, failure to allocate from a CMA area constitutes a
functional failure.  Sometimes during CMA allocations, we have observed
that pages in a CMA area allocated through alloc_pages(), that we're trying
to migrate away to make room for a CMA allocation, are temporarily pinned.
This temporary pinning can occur when a process that owns the pinned page
is being forked (the example is explained further in the commit text), or it is
exiting.  This patch addresses this issue by indefinitely retrying allocations
that fail due to a return of -EBUSY.

Change log: 

v1: We were performing retries of the allocation a fixed number of times.
Andrew Morton disliked this, as it didn't guarantee that the allocation would
succeed.

v2: To address this concern, we switched to retrying indefinitely, as opposed to
doing to retrying  the allocation a limited number of times.

Chris Goldsworthy (1):
  mm: cma: indefinitely retry allocations in cma_alloc

 mm/cma.c | 25 +++++++++++++++++++++++--
 1 file changed, 23 insertions(+), 2 deletions(-)

-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-09-11 21:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-11 20:54 [PATCH v2] cma_alloc(), indefinitely retry allocations for -EBUSY failures Chris Goldsworthy
2020-09-11 21:29 ` Chris Goldsworthy
  -- strict thread matches above, loose matches on Subject: below --
2020-09-11 20:28 Chris Goldsworthy
2020-09-11 20:24 Chris Goldsworthy
     [not found] <06489716814387e7f147cf53d1b185a8@codeaurora.org>
2020-09-11 19:17 ` Chris Goldsworthy
2020-09-11 19:17 ` Chris Goldsworthy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.