From: David Hildenbrand <david@redhat.com>
To: Christoph Hellwig <hch@infradead.org>,
"Kasireddy, Vivek" <vivek.kasireddy@intel.com>
Cc: "dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
Daniel Vetter <daniel.vetter@ffwll.ch>,
Mike Kravetz <mike.kravetz@oracle.com>,
Hugh Dickins <hughd@google.com>, Peter Xu <peterx@redhat.com>,
Gerd Hoffmann <kraxel@redhat.com>,
"Kim, Dongwon" <dongwon.kim@intel.com>,
"Chang, Junxiao" <junxiao.chang@intel.com>,
Jason Gunthorpe <jgg@nvidia.com>
Subject: Re: [PATCH v5 3/5] mm/gup: Introduce pin_user_pages_fd() for pinning shmem/hugetlbfs file pages (v5)
Date: Mon, 4 Dec 2023 10:05:47 +0100 [thread overview]
Message-ID: <a4861ace-3cc3-435a-8d8d-1e902fc9d2d0@redhat.com> (raw)
In-Reply-To: <ZW2KzbRKEWZ7ZTGn@infradead.org>
On 04.12.23 09:16, Christoph Hellwig wrote:
> On Thu, Nov 30, 2023 at 06:41:11AM +0000, Kasireddy, Vivek wrote:
>> I see your concern. The word "file" does make it look like this API works
>> with all kinds of files although it is meant to specifically work with
>> files that
>> belong to shmemfs or hugetlbfs. Since it is intended to work with memfds
>> in particular, I'll rename this helper alloc_memfd_page(). I think it also
>> makes sense to do s/file/memfd in this whole patch. Does this sound ok?
>
> That sounds much better, yes. And please also rename the new api
> to memfd_pin_user_pages。
>
>>
>>> asserts that this is true). gup.c also seems like a very odd place
>>> for such a helper.
>> I only created this helper to cleanly separate lookup and creation and to
>> reduce the level of indentation in pin_user_pages_fd(). Anyway, would
>> mm/memfd.c be a more appropriate location?
>
> I think so, but I'll defer to the MM maintainers.
>
>> As mentioned above, this API is mainly intended for memfds and FWICS,
>> memfds are backed by files from either shmemfs or hugetlbfs.
>
> Ok. Witht better naming this should be more obvious.
>
>
All sounds reasonable to me!
--
Cheers,
David / dhildenb
next prev parent reply other threads:[~2023-12-04 9:05 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-23 6:44 [PATCH v5 0/5] mm/gup: Introduce pin_user_pages_fd() for pinning shmem/hugetlbfs file pages (v5) Vivek Kasireddy
2023-11-23 6:44 ` [PATCH v5 1/5] udmabuf: Use vmf_insert_pfn and VM_PFNMAP for handling mmap Vivek Kasireddy
2023-11-23 6:44 ` [PATCH v5 2/5] udmabuf: Add back support for mapping hugetlb pages (v4) Vivek Kasireddy
2023-11-23 6:44 ` [PATCH v5 3/5] mm/gup: Introduce pin_user_pages_fd() for pinning shmem/hugetlbfs file pages (v5) Vivek Kasireddy
2023-11-28 9:12 ` Christoph Hellwig
2023-11-30 6:41 ` Kasireddy, Vivek
2023-12-04 8:16 ` Christoph Hellwig
2023-12-04 9:05 ` David Hildenbrand [this message]
2023-11-23 6:44 ` [PATCH v5 4/5] udmabuf: Pin the pages using pin_user_pages_fd() API (v3) Vivek Kasireddy
2023-11-23 6:44 ` [PATCH v5 5/5] selftests/dma-buf/udmabuf: Add tests to verify data after page migration Vivek Kasireddy
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=a4861ace-3cc3-435a-8d8d-1e902fc9d2d0@redhat.com \
--to=david@redhat.com \
--cc=daniel.vetter@ffwll.ch \
--cc=dongwon.kim@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=hch@infradead.org \
--cc=hughd@google.com \
--cc=jgg@nvidia.com \
--cc=junxiao.chang@intel.com \
--cc=kraxel@redhat.com \
--cc=linux-mm@kvack.org \
--cc=mike.kravetz@oracle.com \
--cc=peterx@redhat.com \
--cc=vivek.kasireddy@intel.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