From: David Hildenbrand <david@redhat.com>
To: Jason Gunthorpe <jgg@ziepe.ca>
Cc: Hyesoo Yu <hyesoo.yu@samsung.com>,
janghyuck.kim@samsung.com, zhaoyang.huang@unisoc.com,
jaewon31.kim@gmail.com, Andrew Morton <akpm@linux-foundation.org>,
John Hubbard <jhubbard@nvidia.com>, Peter Xu <peterx@redhat.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm: gup: fail migration when no migratable page to prevent CMA pinning
Date: Wed, 4 Jun 2025 15:18:36 +0200 [thread overview]
Message-ID: <830b10df-f697-409d-9ec4-37bc0196cec7@redhat.com> (raw)
In-Reply-To: <20250604131158.GA17991@ziepe.ca>
On 04.06.25 15:11, Jason Gunthorpe wrote:
> On Wed, Jun 04, 2025 at 12:07:21PM +0200, David Hildenbrand wrote:
>
>>> Instead of retrying, this patch explicitly fails the migration attempt
>>> (-EBUSY) if no movable pages are found and unpinnable pages remain.
>>> This avoids infinite loops and gives user a clear signal to retry,
>>> rather then spinning inside kernel.
>>
>> Hmmm, that means we will return EBUSY to the caller. Are all users actually
>> prepared to deal with that?
>
> I don't think anyone is really prepared to deal with GUP temporarily
> failing..
>
> Kernel is expected to sort it out. We tolerated the existing temporary
> failure due to its rarity and lack of a solution only.
>
> Either it can be gup'd or not. There should be no retry.
Right, so -EAGAIN should be used for now such that GUP itself will retry
and can be canceled on signal if required.
--
Cheers,
David / dhildenb
prev parent reply other threads:[~2025-06-04 13:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20250604095242epcas2p17032a1133b03be2d24c8ebcff94d1d55@epcas2p1.samsung.com>
2025-06-04 9:50 ` Hyesoo Yu
2025-06-04 10:07 ` David Hildenbrand
2025-06-04 10:20 ` Hyesoo Yu
2025-06-04 13:11 ` Jason Gunthorpe
2025-06-04 13:18 ` David Hildenbrand [this message]
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=830b10df-f697-409d-9ec4-37bc0196cec7@redhat.com \
--to=david@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=hyesoo.yu@samsung.com \
--cc=jaewon31.kim@gmail.com \
--cc=janghyuck.kim@samsung.com \
--cc=jgg@ziepe.ca \
--cc=jhubbard@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=peterx@redhat.com \
--cc=zhaoyang.huang@unisoc.com \
/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