On 27.01.23 01:05, David Howells wrote:
David Hildenbrand <david@xxxxxxxxxx> wrote:
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