Re: [PATCH 6/7] mm, fs: introduce file_operations->post_mmap()

2017-09-27 Thread Dan Williams
On Wed, Sep 27, 2017 at 8:39 AM, Ross Zwisler wrote: > On Wed, Sep 27, 2017 at 01:35:27PM +0200, Jan Kara wrote: [..] >> Hum, this is an interesting option. So do you suggest that filesystems >> supporting DAX would always setup mappings with VM_MIXEDMAP and without >> VM_HUGEPAGE and thus we'd ge

Re: [PATCH 6/7] mm, fs: introduce file_operations->post_mmap()

2017-09-27 Thread Ross Zwisler
On Wed, Sep 27, 2017 at 01:35:27PM +0200, Jan Kara wrote: > On Tue 26-09-17 14:41:53, Dan Williams wrote: > > On Tue, Sep 26, 2017 at 2:06 PM, Ross Zwisler > > wrote: > > > On Tue, Sep 26, 2017 at 12:19:21PM -0700, Dan Williams wrote: > > >> On Tue, Sep 26, 2017 at 11:57 AM, Ross Zwisler > > > <>

Re: [PATCH 6/7] mm, fs: introduce file_operations->post_mmap()

2017-09-27 Thread Dan Williams
On Wed, Sep 27, 2017 at 8:07 AM, Jan Kara wrote: > On Wed 27-09-17 07:00:53, Dan Williams wrote: >> On Wed, Sep 27, 2017 at 4:35 AM, Jan Kara wrote: >> > On Tue 26-09-17 14:41:53, Dan Williams wrote: >> >> On Tue, Sep 26, 2017 at 2:06 PM, Ross Zwisler >> >> wrote: >> >> > On Tue, Sep 26, 2017 at

Re: [PATCH 6/7] mm, fs: introduce file_operations->post_mmap()

2017-09-27 Thread Jan Kara
On Wed 27-09-17 07:00:53, Dan Williams wrote: > On Wed, Sep 27, 2017 at 4:35 AM, Jan Kara wrote: > > On Tue 26-09-17 14:41:53, Dan Williams wrote: > >> On Tue, Sep 26, 2017 at 2:06 PM, Ross Zwisler > >> wrote: > >> > On Tue, Sep 26, 2017 at 12:19:21PM -0700, Dan Williams wrote: > >> >> On Tue, Se

Re: [PATCH 6/7] mm, fs: introduce file_operations->post_mmap()

2017-09-27 Thread Dan Williams
On Wed, Sep 27, 2017 at 4:35 AM, Jan Kara wrote: > On Tue 26-09-17 14:41:53, Dan Williams wrote: >> On Tue, Sep 26, 2017 at 2:06 PM, Ross Zwisler >> wrote: >> > On Tue, Sep 26, 2017 at 12:19:21PM -0700, Dan Williams wrote: >> >> On Tue, Sep 26, 2017 at 11:57 AM, Ross Zwisler >> > <> >> >> > This

Re: [PATCH 6/7] mm, fs: introduce file_operations->post_mmap()

2017-09-27 Thread Jan Kara
On Tue 26-09-17 14:41:53, Dan Williams wrote: > On Tue, Sep 26, 2017 at 2:06 PM, Ross Zwisler > wrote: > > On Tue, Sep 26, 2017 at 12:19:21PM -0700, Dan Williams wrote: > >> On Tue, Sep 26, 2017 at 11:57 AM, Ross Zwisler > > <> > >> > This decision can only be made (in this > >> > proposed scheme)

Re: [PATCH 6/7] mm, fs: introduce file_operations->post_mmap()

2017-09-26 Thread Dan Williams
On Tue, Sep 26, 2017 at 2:06 PM, Ross Zwisler wrote: > On Tue, Sep 26, 2017 at 12:19:21PM -0700, Dan Williams wrote: >> On Tue, Sep 26, 2017 at 11:57 AM, Ross Zwisler > <> >> > This decision can only be made (in this >> > proposed scheme) *after* the inode->i_mapping->i_mmap tree has been >> > po

Re: [PATCH 6/7] mm, fs: introduce file_operations->post_mmap()

2017-09-26 Thread Ross Zwisler
On Tue, Sep 26, 2017 at 12:19:21PM -0700, Dan Williams wrote: > On Tue, Sep 26, 2017 at 11:57 AM, Ross Zwisler <> > > This decision can only be made (in this > > proposed scheme) *after* the inode->i_mapping->i_mmap tree has been > > populated, which means we need another call into the filesystem

Re: [PATCH 6/7] mm, fs: introduce file_operations->post_mmap()

2017-09-26 Thread Dan Williams
On Tue, Sep 26, 2017 at 11:57 AM, Ross Zwisler wrote: > On Mon, Sep 25, 2017 at 04:38:45PM -0700, Dan Williams wrote: >> On Mon, Sep 25, 2017 at 4:14 PM, Ross Zwisler >> wrote: >> > When mappings are created the vma->vm_flags that they use vary based on >> > whether the inode being mapped is usin

Re: [PATCH 6/7] mm, fs: introduce file_operations->post_mmap()

2017-09-26 Thread Ross Zwisler
On Mon, Sep 25, 2017 at 04:38:45PM -0700, Dan Williams wrote: > On Mon, Sep 25, 2017 at 4:14 PM, Ross Zwisler > wrote: > > When mappings are created the vma->vm_flags that they use vary based on > > whether the inode being mapped is using DAX or not. This setup happens in > > XFS via mmap_region(

Re: [PATCH 6/7] mm, fs: introduce file_operations->post_mmap()

2017-09-25 Thread Christoph Hellwig
On Mon, Sep 25, 2017 at 05:14:03PM -0600, Ross Zwisler wrote: > When mappings are created the vma->vm_flags that they use vary based on > whether the inode being mapped is using DAX or not. This setup happens in > XFS via mmap_region()=>call_mmap()=>xfs_file_mmap(). > > For us to be able to safel

Re: [PATCH 6/7] mm, fs: introduce file_operations->post_mmap()

2017-09-25 Thread Dan Williams
On Mon, Sep 25, 2017 at 4:14 PM, Ross Zwisler wrote: > When mappings are created the vma->vm_flags that they use vary based on > whether the inode being mapped is using DAX or not. This setup happens in > XFS via mmap_region()=>call_mmap()=>xfs_file_mmap(). > > For us to be able to safely use the

[PATCH 6/7] mm, fs: introduce file_operations->post_mmap()

2017-09-25 Thread Ross Zwisler
When mappings are created the vma->vm_flags that they use vary based on whether the inode being mapped is using DAX or not. This setup happens in XFS via mmap_region()=>call_mmap()=>xfs_file_mmap(). For us to be able to safely use the DAX per-inode flag we need to prevent S_DAX transitions when a