From: John Hubbard <jhubbard@nvidia.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Alexander Viro <viro@zeniv.linux.org.uk>,
Ilya Dryomov <idryomov@gmail.com>, Jens Axboe <axboe@kernel.dk>,
<linux-xfs@vger.kernel.org>, <linux-fsdevel@vger.kernel.org>,
<linux-block@vger.kernel.org>, <linux-mm@kvack.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 1/3] mm/gup: introduce pin_user_page()
Date: Sat, 29 Aug 2020 14:57:24 -0700 [thread overview]
Message-ID: <2940f38d-be50-cc9d-efac-b472b90c86ad@nvidia.com> (raw)
In-Reply-To: <20200829145421.GA12470@infradead.org>
On 8/29/20 7:54 AM, Christoph Hellwig wrote:
> On Sat, Aug 29, 2020 at 01:08:51AM -0700, John Hubbard wrote:
>> pin_user_page() is the FOLL_PIN equivalent of get_page().
>>
>> This was always a missing piece of the pin/unpin API calls (early
>> reviewers of pin_user_pages() asked about it, in fact), but until now,
>> it just wasn't needed. Finally though, now that the Direct IO pieces in
>> block/bio are about to be converted to use FOLL_PIN, it turns out that
>> there are some cases in which get_page() and get_user_pages_fast() were
>> both used. Converting those sites requires a drop-in replacement for
>> get_page(), which this patch supplies.
>
> I find the name really confusing vs pin_user_pages*, as it suggests as
> single version of the same. It also seems partially wrong, at least
> in the direct I/O case as the only thing pinned here is the zero page.
>
> So maybe pin_kernel_page is a better name together with an explanation?
> Or just pin_page?
>
Yes. Both its behavior and use are closer to get_page() than it is to
get_user_pages(). So pin_page() is just right.
thanks,
--
John Hubbard
NVIDIA
next prev parent reply other threads:[~2020-08-29 21:57 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-29 8:08 [PATCH v2 0/3] bio: Direct IO: convert to pin_user_pages_fast() John Hubbard
2020-08-29 8:08 ` [PATCH v2 1/3] mm/gup: introduce pin_user_page() John Hubbard
2020-08-29 14:54 ` Christoph Hellwig
2020-08-29 21:57 ` John Hubbard [this message]
2020-08-29 8:08 ` [PATCH v2 2/3] iov_iter: introduce iov_iter_pin_user_pages*() routines John Hubbard
2020-08-29 14:58 ` Christoph Hellwig
2020-08-29 21:58 ` John Hubbard
2020-08-30 20:17 ` Al Viro
2020-08-30 20:44 ` John Hubbard
2020-08-29 8:08 ` [PATCH v2 3/3] bio: convert get_user_pages_fast() --> pin_user_pages_fast() John Hubbard
2020-08-29 15:02 ` Christoph Hellwig
2020-08-29 22:08 ` John Hubbard
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=2940f38d-be50-cc9d-efac-b472b90c86ad@nvidia.com \
--to=jhubbard@nvidia.com \
--cc=akpm@linux-foundation.org \
--cc=axboe@kernel.dk \
--cc=hch@infradead.org \
--cc=idryomov@gmail.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-xfs@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/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;
as well as URLs for NNTP newsgroup(s).