Re: [PATCH v7 2/8] iov_iter: Add a function to extract a page list from an iterator
From: David Hildenbrand <hidden>
Date: 2023-01-27 00:21:46
Also in:
linux-fsdevel, linux-mm, lkml
From: David Hildenbrand <hidden>
Date: 2023-01-27 00:21:46
Also in:
linux-fsdevel, linux-mm, lkml
On 27.01.23 01:05, David Howells wrote:
David Hildenbrand [off-list ref] wrote:quoted
As raised already somewhere in the whole discussion by me, the right way to take such a long-term ping as vmsplice() does is to use FOLL_PIN|FOLL_LONGTERM.So the pipe infrastructure would have to be able to pin pages instead of carrying refs on them? What about pages just allocated and added to the pipe ring in normal pipe use?
Ordinary kernel allocations (alloc_page() ...) always have to be freed via put_page() and friends. Such allocations are unmovable as default and don't require any special care. Pages mapped into user space are movable as default and might be placed on ZONE_MOVABLE/CMA memory (well, and might be swapped out). FOLL_LONGTERM makes sure to migrate these pages off of such problematic physical memory regions, such that we can safely pin them until eternity. -- Thanks, David / dhildenb