On 08.12.23 08:57, Kasireddy, Vivek wrote:
Hi David,
On 05.12.23 06:35, Vivek Kasireddy wrote:
For drivers that would like to longterm-pin the pages associated
with a memfd, the pin_user_pages_fd() API provides an option to
not only pin the pages via FOLL_PIN but also to check and migrate
Hi David,
> >
> >> On 05.12.23 06:35, Vivek Kasireddy wrote:
> >>> For drivers that would like to longterm-pin the pages associated
> >>> with a memfd, the pin_user_pages_fd() API provides an option to
> >>> not only pin the pages via FOLL_PIN but also to check and migrate
> >>> them if they
On 07.12.23 14:05, Jason Gunthorpe wrote:
On Thu, Dec 07, 2023 at 10:44:14AM +0100, David Hildenbrand wrote:
If you always want to return folios, then better name it
"memfd_pin_user_folios" (or just "memfd_pin_folios") and pass in a range
(instead of a nr_pages parameter), and somehow indicate
On Thu, Dec 07, 2023 at 10:44:14AM +0100, David Hildenbrand wrote:
> > > If you always want to return folios, then better name it
> > > "memfd_pin_user_folios" (or just "memfd_pin_folios") and pass in a range
> > > (instead of a nr_pages parameter), and somehow indicate to the caller
> > > how
On 07.12.23 06:09, Kasireddy, Vivek wrote:
Hi David,
On 05.12.23 06:35, Vivek Kasireddy wrote:
For drivers that would like to longterm-pin the pages associated
with a memfd, the pin_user_pages_fd() API provides an option to
not only pin the pages via FOLL_PIN but also to check and migrate
Hi David,
> On 05.12.23 06:35, Vivek Kasireddy wrote:
> > For drivers that would like to longterm-pin the pages associated
> > with a memfd, the pin_user_pages_fd() API provides an option to
> > not only pin the pages via FOLL_PIN but also to check and migrate
> > them if they reside in movable
Hi,
> > +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),
> > +
On 05.12.23 06:35, Vivek Kasireddy wrote:
For drivers that would like to longterm-pin the pages associated
with a memfd, the pin_user_pages_fd() API provides an option to
not only pin the pages via FOLL_PIN but also to check and migrate
them if they reside in movable zone or CMA block. This API
For drivers that would like to longterm-pin the pages associated
with a memfd, the pin_user_pages_fd() API provides an option to
not only pin the pages via FOLL_PIN but also to check and migrate
them if they reside in movable zone or CMA block. This API
currently works with memfds but it should