Thread (75 messages) 75 messages, 5 authors, 2023-01-24

Re: [PATCH v8 02/10] iov_iter: Add a function to extract a page list from an iterator

From: David Hildenbrand <hidden>
Date: 2023-01-24 14:53:54
Also in: linux-fsdevel, linux-mm, lkml

On 24.01.23 15:45, David Howells wrote:
David Hildenbrand [off-list ref] wrote:
quoted
At least reduces the occurrences of FOLL_PIN :)
I don't see where the problem is in letting people supply FOLL_PIN or
FOLL_GET.  Why even have pin_user_pages() and get_user_pages() since they end
up at the same place.  They should be inline wrappers, if separate functions
at all.
There once was a proposed goal of restricting FOLL_GET to core-mm and 
allowing other drivers etc. to only use FOLL_PIN. Providing 
pin_user_pages() and the corresponding unpin part seemed very clean to me.

To me that makes perfect sense and will prevent any misuse once we 
converted everything relevant to FOLL_PIN.


To be precise, I think we could get away in this patch set by not using 
FOLL_PIN and FOLL_GET and it wouldn't really reduce readability of the 
code ...

-- 
Thanks,

David / dhildenb
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help