Re: [PATCH v7 0/8] iov_iter: Improve page extraction (ref, pin or just list)

From: Christoph Hellwig
Date: Tue Jan 24 2023 - 08:21:40 EST


On Tue, Jan 24, 2023 at 11:29:31AM +0100, Jan Kara wrote:
> True but as John said sometimes we need to writeout even pinned page - e.g.
> on fsync(2). For some RDMA users which keep pages pinned for days or
> months, this is actually crutial...

I think we have to distinguish between short term (just FOLL_PIN)
and long term (FOLL_PIN | FOLL_LONGERM) pins.

For short term ones the proper thing to do in data integrity writeback
is to simply wait for the unpin. For the long term pins that obviously
can't work. The right answer for that is complicated and I don't have
a good answer yet. The best one would probably to probibit them on
MAP_SHARED file backed mappings - this might break some existing
software, but that software is already so broken that this might be
best.