Re: [LSF/MM TOPIC] Discuss least bad options for resolving longterm-GUP usage by RDMA

From: Christopher Lameter
Date: Thu Feb 07 2019 - 13:17:49 EST

On Thu, 7 Feb 2019, Ira Weiny wrote:

> On Thu, Feb 07, 2019 at 04:55:37PM +0000, Christopher Lameter wrote:
> > One approach that may be a clean way to solve this:
> >
> > 1. Long term GUP usage requires the virtual mapping to the pages be fixed
> > for the duration of the GUP Map. There never has been a way to break
> > the pinnning and thus this needs to be preserved.
> How does this fit in with the changes John is making?
> >
> > 2. Page Cache Long term pins are not allowed since regular filesystems
> > depend on COW and other tricks which are incompatible with a long term
> > pin.
> Unless the hardware supports ODP or equivalent functionality. Right?

Ok we could make an exception there. But that is not required as a first
step and only some hardware would support it.

> > 3. Filesystems that allow bypass of the page cache (like XFS / DAX) will
> > provide the virtual mapping when the PIN is done and DO NO OPERATIONS
> > on the longterm pinned range until the long term pin is removed.
> > Hardware may do its job (like for persistent memory) but no data
> > consistency on the NVDIMM medium is guaranteed until the long term pin
> > is removed and the filesystems regains control over the area.
> I believe Dan attempted something like this and it became pretty difficult.

What is difficult about leaving things alone that are pinned? We already
have to do that currently because the refcount is elevated.