From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jason Gunthorpe Subject: Re: [LSF/MM TOPIC] Discuss least bad options for resolving longterm-GUP usage by RDMA Date: Mon, 11 Feb 2019 11:06:54 -0700 Message-ID: <20190211180654.GB24692@ziepe.ca> References: <20190206220828.GJ12227@ziepe.ca> <0c868bc615a60c44d618fb0183fcbe0c418c7c83.camel@redhat.com> <01000168c8e2de6b-9ab820ed-38ad-469c-b210-60fcff8ea81c-000000@email.amazonses.com> <20190208044302.GA20493@dastard> <20190208111028.GD6353@quack2.suse.cz> <20190211102402.GF19029@quack2.suse.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: Dan Williams Cc: Jan Kara , Dave Chinner , Christopher Lameter , Doug Ledford , Matthew Wilcox , Ira Weiny , lsf-pc@lists.linux-foundation.org, linux-rdma , Linux MM , Linux Kernel Mailing List , John Hubbard , Jerome Glisse , Michal Hocko List-Id: linux-rdma@vger.kernel.org On Mon, Feb 11, 2019 at 09:22:58AM -0800, Dan Williams wrote: > I honestly don't like the idea that random subsystems can pin down > file blocks as a side effect of gup on the result of mmap. Recall that > it's not just RDMA that wants this guarantee. It seems safer to have > the file be in an explicit block-allocation-immutable-mode so that the > fallocate man page can describe this error case. Otherwise how would > you describe the scenarios under which FALLOC_FL_PUNCH_HOLE fails? I rather liked CL's version of this - ftruncate/etc is simply racing with a parallel pwrite - and it doesn't fail. But it also doesnt' trucate/create a hole. Another thread wrote to it right away and the 'hole' was essentially instantly reallocated. This is an inherent, pre-existing, race in the ftrucate/etc APIs. Jason