From: Chris Goldsworthy <cgoldswo@codeaurora.org>
To: akpm@linux-foundation.org
Cc: linux-mm@kvack.org, linux-arm-msm@vger.kernel.org,
linux-kernel@vger.kernel.org, pratikp@codeaurora.org,
pdaly@codeaurora.org, sudraja@codeaurora.org,
iamjoonsoo.kim@lge.com, linux-arm-msm-owner@vger.kernel.org,
Chris Goldsworthy <cgoldswo@codeaurora.org>
Subject: [PATCH v2] cma_alloc(), indefinitely retry allocations for -EBUSY failures
Date: Fri, 11 Sep 2020 19:17:02 +0000 [thread overview]
Message-ID: <010101747e997e00-a7fa11e6-74ae-46f7-8ab6-5fb5a4b04ac2-000000@us-west-2.amazonses.com> (raw)
In-Reply-To: <06489716814387e7f147cf53d1b185a8@codeaurora.org>
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
next parent reply other threads:[~2020-09-11 19:17 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <06489716814387e7f147cf53d1b185a8@codeaurora.org>
2020-09-11 19:17 ` Chris Goldsworthy [this message]
[not found] ` <1599851809-4342-1-git-send-email-cgoldswo@codeaurora.org>
2020-09-11 19:17 ` [PATCH v2] mm: cma: indefinitely retry allocations in cma_alloc Chris Goldsworthy
2020-09-14 9:31 ` David Hildenbrand
2020-09-14 18:33 ` Chris Goldsworthy
2020-09-14 21:52 ` Chris Goldsworthy
2020-09-15 7:53 ` David Hildenbrand
2020-09-17 17:26 ` Chris Goldsworthy
2020-09-17 17:54 ` Chris Goldsworthy
2020-09-24 5:13 ` Chris Goldsworthy
2020-09-28 7:39 ` Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=010101747e997e00-a7fa11e6-74ae-46f7-8ab6-5fb5a4b04ac2-000000@us-west-2.amazonses.com \
--to=cgoldswo@codeaurora.org \
--cc=akpm@linux-foundation.org \
--cc=iamjoonsoo.kim@lge.com \
--cc=linux-arm-msm-owner@vger.kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=pdaly@codeaurora.org \
--cc=pratikp@codeaurora.org \
--cc=sudraja@codeaurora.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox