Re: [PATCH v7 2/8] iov_iter: Add a function to extract a page list from an iterator

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 23.01.23 14:19, David Howells wrote:
David Hildenbrand <david@xxxxxxxxxx> wrote:

Switching from FOLL_GET to FOLL_PIN was in the works by John H. Not sure what
the status is. Interestingly, Documentation/core-api/pin_user_pages.rst
already documents that "CASE 1: Direct IO (DIO)" uses FOLL_PIN ... which does,
unfortunately, no reflect reality yet.

Yeah - I just came across that.

Should iov_iter.c then switch entirely to using pin_user_pages(), rather than
get_user_pages()?  In which case my patches only need keep track of
pinned/not-pinned and never "got".

That would be the ideal case: whenever intending to access page content, use FOLL_PIN instead of FOLL_GET.

The issue that John was trying to sort out was that there are plenty of callsites that do a simple put_page() instead of calling unpin_user_page(). IIRC, handling that correctly in existing code -- what was pinned must be released via unpin_user_page() -- was the biggest workitem.

Not sure how that relates to your work here (that's why I was asking): if you could avoid FOLL_GET, that would be great :)

--
Thanks,

David / dhildenb




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux