Re: [PATCH v3 00/13] dax: fix dma vs truncate and remove 'page-less' support

2017-10-30 Thread Dan Williams
On Mon, Oct 30, 2017 at 4:20 AM, Dave Chinner wrote: > On Mon, Oct 30, 2017 at 09:38:07AM +0100, Jan Kara wrote: >> Hi, >> >> On Mon 30-10-17 13:00:23, Dave Chinner wrote: >> > On Sun, Oct 29, 2017 at 04:46:44PM -0700, Dan Williams wrote: >> > > Coming back to this since Dave has made clear that n

Re: [PATCH v3 00/13] dax: fix dma vs truncate and remove 'page-less' support

2017-10-30 Thread Dave Chinner
On Mon, Oct 30, 2017 at 09:38:07AM +0100, Jan Kara wrote: > Hi, > > On Mon 30-10-17 13:00:23, Dave Chinner wrote: > > On Sun, Oct 29, 2017 at 04:46:44PM -0700, Dan Williams wrote: > > > Coming back to this since Dave has made clear that new locking to > > > coordinate get_user_pages() is a no-go.

Re: [PATCH v3 00/13] dax: fix dma vs truncate and remove 'page-less' support

2017-10-30 Thread Jan Kara
Hi, On Mon 30-10-17 13:00:23, Dave Chinner wrote: > On Sun, Oct 29, 2017 at 04:46:44PM -0700, Dan Williams wrote: > > Coming back to this since Dave has made clear that new locking to > > coordinate get_user_pages() is a no-go. > > > > We can unmap to force new get_user_pages() attempts to block

Re: [PATCH v3 00/13] dax: fix dma vs truncate and remove 'page-less' support

2017-10-29 Thread Dave Chinner
On Sun, Oct 29, 2017 at 04:46:44PM -0700, Dan Williams wrote: > On Thu, Oct 26, 2017 at 3:58 AM, Jan Kara wrote: > > On Fri 20-10-17 11:31:48, Christoph Hellwig wrote: > >> On Fri, Oct 20, 2017 at 09:47:50AM +0200, Christoph Hellwig wrote: > >> > I'd like to brainstorm how we can do something bett

Re: [PATCH v3 00/13] dax: fix dma vs truncate and remove 'page-less' support

2017-10-29 Thread Dan Williams
On Thu, Oct 26, 2017 at 3:58 AM, Jan Kara wrote: > On Fri 20-10-17 11:31:48, Christoph Hellwig wrote: >> On Fri, Oct 20, 2017 at 09:47:50AM +0200, Christoph Hellwig wrote: >> > I'd like to brainstorm how we can do something better. >> > >> > How about: >> > >> > If we hit a page with an elevated r

Re: [PATCH v3 00/13] dax: fix dma vs truncate and remove 'page-less' support

2017-10-29 Thread Dave Chinner
On Fri, Oct 27, 2017 at 01:42:16PM +0200, Dan Williams wrote: > [replying from my phone, please forgive formatting] > > On Friday, October 27, 2017, Dave Chinner wrote: > > > > > Here are the two primary patches in > > > the series, do you think the extent-busy approach would be cleaner? > > >

Re: [PATCH v3 00/13] dax: fix dma vs truncate and remove 'page-less' support

2017-10-26 Thread Dave Chinner
On Thu, Oct 26, 2017 at 11:51:04PM +, Williams, Dan J wrote: > On Thu, 2017-10-26 at 12:58 +0200, Jan Kara wrote: > > On Fri 20-10-17 11:31:48, Christoph Hellwig wrote: > > > On Fri, Oct 20, 2017 at 09:47:50AM +0200, Christoph Hellwig wrote: > > > > I'd like to brainstorm how we can do somethin

Re: [PATCH v3 00/13] dax: fix dma vs truncate and remove 'page-less' support

2017-10-26 Thread Christoph Hellwig
On Thu, Oct 26, 2017 at 12:58:50PM +0200, Jan Kara wrote: > But are we guaranteed page refs are short term? E.g. if someone creates > v4l2 videobuf in MAP_SHARED mapping of a file on DAX filesystem, page refs > can be rather long-term similarly as in RDMA case. Also freeing of blocks > on page refe

Re: [PATCH v3 00/13] dax: fix dma vs truncate and remove 'page-less' support

2017-10-26 Thread Williams, Dan J
On Thu, 2017-10-26 at 12:58 +0200, Jan Kara wrote: > On Fri 20-10-17 11:31:48, Christoph Hellwig wrote: > > On Fri, Oct 20, 2017 at 09:47:50AM +0200, Christoph Hellwig wrote: > > > I'd like to brainstorm how we can do something better. > > > > > > How about: > > > > > > If we hit a page with an e

Re: [PATCH v3 00/13] dax: fix dma vs truncate and remove 'page-less' support

2017-10-26 Thread Jan Kara
On Fri 20-10-17 11:31:48, Christoph Hellwig wrote: > On Fri, Oct 20, 2017 at 09:47:50AM +0200, Christoph Hellwig wrote: > > I'd like to brainstorm how we can do something better. > > > > How about: > > > > If we hit a page with an elevated refcount in truncate / hole puch > > etc for a DAX file s

Re: [PATCH v3 00/13] dax: fix dma vs truncate and remove 'page-less' support

2017-10-20 Thread Christoph Hellwig
On Fri, Oct 20, 2017 at 09:47:50AM +0200, Christoph Hellwig wrote: > I'd like to brainstorm how we can do something better. > > How about: > > If we hit a page with an elevated refcount in truncate / hole puch > etc for a DAX file system we do not free the blocks in the file system, > but add it

Re: [PATCH v3 00/13] dax: fix dma vs truncate and remove 'page-less' support

2017-10-20 Thread Christoph Hellwig
> The solution presented is not pretty. It creates a stream of leases, one > for each get_user_pages() invocation, and polls page reference counts > until DMA stops. We're missing a reliable way to not only trap the > DMA-idle event, but also block new references being taken on pages while > trunca

[PATCH v3 00/13] dax: fix dma vs truncate and remove 'page-less' support

2017-10-19 Thread Dan Williams
Changes since v2 [1]: * Add 'dax: handle truncate of dma-busy pages' which builds on the removal of page-less dax to fix a latent bug handling dma vs truncate. * Disable get_user_pages_fast() for dax * Disable RDMA memory registrations against filesystem-DAX mappings for non-ODP (On Demand Pagi