linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: "Kasireddy, Vivek" <vivek.kasireddy@intel.com>
Cc: Christoph Hellwig <hch@infradead.org>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	David Hildenbrand <david@redhat.com>,
	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 00:16:13 -0800	[thread overview]
Message-ID: <ZW2KzbRKEWZ7ZTGn@infradead.org> (raw)
In-Reply-To: <IA0PR11MB71857980C94225951F6DD3AAF882A@IA0PR11MB7185.namprd11.prod.outlook.com>

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.



  reply	other threads:[~2023-12-04  8:16 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-23  6:44 [PATCH v5 0/5] " 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 [this message]
2023-12-04  9:05         ` David Hildenbrand
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=ZW2KzbRKEWZ7ZTGn@infradead.org \
    --to=hch@infradead.org \
    --cc=daniel.vetter@ffwll.ch \
    --cc=david@redhat.com \
    --cc=dongwon.kim@intel.com \
    --cc=dri-devel@lists.freedesktop.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