[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190207173504.GD29531@iweiny-DESK2.sc.intel.com>
Date: Thu, 7 Feb 2019 09:35:04 -0800
From: Ira Weiny <ira.weiny@...el.com>
To: Christopher Lameter <cl@...ux.com>
Cc: Doug Ledford <dledford@...hat.com>,
Dan Williams <dan.j.williams@...el.com>,
Jason Gunthorpe <jgg@...pe.ca>,
Dave Chinner <david@...morbit.com>,
Matthew Wilcox <willy@...radead.org>, Jan Kara <jack@...e.cz>,
lsf-pc@...ts.linux-foundation.org,
linux-rdma <linux-rdma@...r.kernel.org>,
Linux MM <linux-mm@...ck.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
John Hubbard <jhubbard@...dia.com>,
Jerome Glisse <jglisse@...hat.com>,
Michal Hocko <mhocko@...nel.org>
Subject: Re: [LSF/MM TOPIC] Discuss least bad options for resolving
longterm-GUP usage by RDMA
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?
>
> 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.
>
> 4. Long term pin means that the mapped sections are an actively used part
> of the file (like a filesystem write) and it cannot be truncated for
> the duration of the pin. It can be thought of as if the truncate is
> immediate followed by a write extending the file again. The mapping
> by RDMA implies after all that remote writes can occur at anytime
> within the area pinned long term.
>
This is a very interesting idea. I've never quite thought of it that way.
That would be essentially like failing the truncate but without actually
failing it... sneaky. ;-)
What if user space then writes to the end of the file? Does that write end
up at the point they truncated to or off the end of the mmaped area (old
length)?
I can see the behavior being defined either way. But one interferes with the
RDMA data and the other does not. Not sure which is easier for the FS to
handle either.
Ira
Powered by blists - more mailing lists