From: Christoph Hellwig <hch@infradead.org>
To: Vivek Kasireddy <vivek.kasireddy@intel.com>
Cc: dri-devel@lists.freedesktop.org, linux-mm@kvack.org,
David Hildenbrand <david@redhat.com>,
Christoph Hellwig <hch@infradead.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>,
Dongwon Kim <dongwon.kim@intel.com>,
Junxiao Chang <junxiao.chang@intel.com>,
Jason Gunthorpe <jgg@nvidia.com>
Subject: Re: [PATCH v6 3/5] mm/gup: Introduce memfd_pin_user_pages() for pinning memfd pages (v6)
Date: Wed, 6 Dec 2023 01:18:45 -0800 [thread overview]
Message-ID: <ZXA8dXR3kq7BOLkY@infradead.org> (raw)
In-Reply-To: <20231205053509.2342169-4-vivek.kasireddy@intel.com>
> +struct page *memfd_alloc_page(struct file *memfd, pgoff_t idx)
> +{
> +#ifdef CONFIG_HUGETLB_PAGE
> + struct folio *folio;
> + int err;
> +
> + if (is_file_hugepages(memfd)) {
> + folio = alloc_hugetlb_folio_nodemask(hstate_file(memfd),
> + NUMA_NO_NODE,
> + NULL,
> + GFP_USER);
> + if (folio && folio_try_get(folio)) {
> + err = hugetlb_add_to_page_cache(folio,
If alloc_hugetlb_folio_nodemask moved out of the CONFIG_HUGETLB_PAGE
ifdef, the ifdef here could go away.
Either way, this looks good:
Reviewed-by: Christoph Hellwig <hch@lst.de>
next prev parent reply other threads:[~2023-12-06 9:18 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-05 5:35 [PATCH v6 0/5] " Vivek Kasireddy
2023-12-05 5:35 ` [PATCH v6 1/5] udmabuf: Use vmf_insert_pfn and VM_PFNMAP for handling mmap Vivek Kasireddy
2023-12-05 5:35 ` [PATCH v6 2/5] udmabuf: Add back support for mapping hugetlb pages (v5) Vivek Kasireddy
2023-12-06 9:16 ` Christoph Hellwig
2023-12-05 5:35 ` [PATCH v6 3/5] mm/gup: Introduce memfd_pin_user_pages() for pinning memfd pages (v6) Vivek Kasireddy
2023-12-06 9:18 ` Christoph Hellwig [this message]
2023-12-07 5:06 ` Kasireddy, Vivek
2023-12-06 11:19 ` David Hildenbrand
2023-12-07 5:09 ` Kasireddy, Vivek
2023-12-07 9:44 ` David Hildenbrand
2023-12-07 13:05 ` Jason Gunthorpe
2023-12-07 13:35 ` David Hildenbrand
2023-12-08 7:57 ` Kasireddy, Vivek
2023-12-08 9:53 ` David Hildenbrand
2023-12-05 5:35 ` [PATCH v6 4/5] udmabuf: Pin the pages using memfd_pin_user_pages() API (v4) Vivek Kasireddy
2023-12-05 5:35 ` [PATCH v6 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=ZXA8dXR3kq7BOLkY@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