[PATCH v5 1/5] mm: add vm_insert_mixed_mkwrite()

2017-07-24 Thread Ross Zwisler
call path. Signed-off-by: Ross Zwisler <ross.zwis...@linux.intel.com> Reviewed-by: Jan Kara <j...@suse.cz> --- include/linux/mm.h | 2 ++ mm/memory.c| 50 +++--- 2 files changed, 45 insertions(+), 7 deletions(-) diff --git a/include

[PATCH v5 4/5] dax: remove DAX code from page_cache_tree_insert()

2017-07-24 Thread Ross Zwisler
Now that we no longer insert struct page pointers in DAX radix trees we can remove the special casing for DAX in page_cache_tree_insert(). This also allows us to make dax_wake_mapping_entry_waiter() local to fs/dax.c, removing it from dax.h. Signed-off-by: Ross Zwisler <ross.z

[PATCH v5 5/5] dax: move all DAX radix tree defs to fs/dax.c

2017-07-24 Thread Ross Zwisler
Now that we no longer insert struct page pointers in DAX radix trees the page cache code no longer needs to know anything about DAX exceptional entries. Move all the DAX exceptional entry definitions from dax.h to fs/dax.c. Signed-off-by: Ross Zwisler <ross.zwis...@linux.intel.com> Sug

[PATCH v5 3/5] dax: use common 4k zero page for dax mmap reads

2017-07-24 Thread Ross Zwisler
kwrite' flag. If 'mkwrite' is set insert_pfn() will do the work that was previously done by wp_page_reuse() as part of the dax_pfn_mkwrite() call path. *** Signed-off-by: Ross Zwisler <ross.zwis...@linux.intel.com> Reviewed-by: Jan Kara <j...@suse.cz> --- Documentation/filesystems/da

[PATCH v5 2/5] dax: relocate some dax functions

2017-07-24 Thread Ross Zwisler
-by: Ross Zwisler <ross.zwis...@linux.intel.com> Reviewed-by: Jan Kara <j...@suse.cz> --- fs/dax.c | 138 +++ 1 file changed, 69 insertions(+), 69 deletions(-) diff --git a/fs/dax.c b/fs/dax.c index 306c2b6..197067f 100644 --

[PATCH v5 0/5] DAX common 4k zero page

2017-07-24 Thread Ross Zwisler
e pages in the radix tree made the DAX code more complex. This series solves these issues by following the lead of the DAX PMD code and using a common 4k zero page instead. This reduces memory usage and decreases latencies for some workloads, and it simplifies the DAX code, removing over 100 lines in total

Re: [PATCH v4 1/5] mm: add mkwrite param to vm_insert_mixed()

2017-07-24 Thread Ross Zwisler
On Mon, Jul 24, 2017 at 01:25:30PM +0200, Jan Kara wrote: > > @@ -1658,14 +1658,28 @@ static int insert_pfn(struct vm_area_struct *vma, > > unsigned long addr, > > if (!pte) > > goto out; > > retval = -EBUSY; > > - if (!pte_none(*pte)) > > - goto out_unlock; > > +

Re: [PATCH v4 1/5] mm: add mkwrite param to vm_insert_mixed()

2017-07-24 Thread Ross Zwisler
On Mon, Jul 24, 2017 at 01:15:31PM +0200, Jan Kara wrote: > On Sat 22-07-17 09:21:31, Dan Williams wrote: > > On Fri, Jul 21, 2017 at 3:39 PM, Ross Zwisler > > <ross.zwis...@linux.intel.com> wrote: > > > To be able to use the common 4k zero page in DAX we need to have

[PATCH v4 4/5] dax: remove DAX code from page_cache_tree_insert()

2017-07-21 Thread Ross Zwisler
Now that we no longer insert struct page pointers in DAX radix trees we can remove the special casing for DAX in page_cache_tree_insert(). This also allows us to make dax_wake_mapping_entry_waiter() local to fs/dax.c, removing it from dax.h. Signed-off-by: Ross Zwisler <ross.z

[PATCH v4 2/5] dax: relocate some dax functions

2017-07-21 Thread Ross Zwisler
-by: Ross Zwisler <ross.zwis...@linux.intel.com> --- fs/dax.c | 138 +++ 1 file changed, 69 insertions(+), 69 deletions(-) diff --git a/fs/dax.c b/fs/dax.c index c844a51..779dc5e 100644 --- a/fs/dax.c +++ b/fs/dax.c @@ -121,6 +

[PATCH v4 1/5] mm: add mkwrite param to vm_insert_mixed()

2017-07-21 Thread Ross Zwisler
call path. Signed-off-by: Ross Zwisler <ross.zwis...@linux.intel.com> --- drivers/dax/device.c| 2 +- drivers/gpu/drm/exynos/exynos_drm_gem.c | 3 ++- drivers/gpu/drm/gma500/framebuffer.c| 2 +- drivers/gpu/drm/msm/msm_gem.c | 3 ++- drivers/gpu/drm/oma

[PATCH v4 3/5] dax: use common 4k zero page for dax mmap reads

2017-07-21 Thread Ross Zwisler
insert_pfn() will do the work that was previously done by wp_page_reuse() as part of the dax_pfn_mkwrite() call path. *** Signed-off-by: Ross Zwisler <ross.zwis...@linux.intel.com> --- Documentation/filesystems/dax.txt | 5 +- fs/dax.c | 240

[PATCH v4 5/5] dax: move all DAX radix tree defs to fs/dax.c

2017-07-21 Thread Ross Zwisler
Now that we no longer insert struct page pointers in DAX radix trees the page cache code no longer needs to know anything about DAX exceptional entries. Move all the DAX exceptional entry definitions from dax.h to fs/dax.c. Signed-off-by: Ross Zwisler <ross.zwis...@linux.intel.com> Sug

[PATCH v4 0/5] DAX common 4k zero page

2017-07-21 Thread Ross Zwisler
ads, and it simplifies the DAX code, removing over 100 lines in total. This series has passed my targeted testing and a full xfstests run on both XFS and ext4. Ross Zwisler (5): mm: add mkwrite param to vm_insert_mixed() dax: relocate some dax functions dax: use common 4k zero page for dax mmap reads

Re: [PATCH v3 1/5] mm: add vm_insert_mixed_mkwrite()

2017-07-21 Thread Ross Zwisler
On Thu, Jul 20, 2017 at 09:59:22AM -0600, Ross Zwisler wrote: > On Thu, Jul 20, 2017 at 11:26:16AM -0400, Vivek Goyal wrote: <> > > Hi Ross, > > > > vm_insert_mixed_mkwrite() is same as vm_insert_mixed() except this sets > > write parameter to inser_pfn() tru

Re: [PATCH v3 1/5] mm: add vm_insert_mixed_mkwrite()

2017-07-21 Thread Ross Zwisler
On Wed, Jul 19, 2017 at 03:58:31PM -0600, Ross Zwisler wrote: > On Wed, Jul 19, 2017 at 11:51:12AM -0600, Ross Zwisler wrote: > > On Wed, Jul 19, 2017 at 04:16:59PM +0200, Jan Kara wrote: > > > On Wed 28-06-17 16:01:48, Ross Zwisler wrote: > > > > To be able to use

Re: [PATCH v3 1/5] mm: add vm_insert_mixed_mkwrite()

2017-07-20 Thread Ross Zwisler
On Thu, Jul 20, 2017 at 11:26:16AM -0400, Vivek Goyal wrote: > On Wed, Jun 28, 2017 at 04:01:48PM -0600, Ross Zwisler wrote: > > To be able to use the common 4k zero page in DAX we need to have our PTE > > fault path look more like our PMD fault path where a PTE entry can be >

Re: [PATCH v3 3/5] dax: use common 4k zero page for dax mmap reads

2017-07-20 Thread Ross Zwisler
On Thu, Jul 20, 2017 at 12:27:23PM +0200, Jan Kara wrote: > On Wed 19-07-17 10:26:45, Ross Zwisler wrote: > > On Wed, Jul 19, 2017 at 05:33:14PM +0200, Jan Kara wrote: > > > On Wed 28-06-17 16:01:50, Ross Zwisler wrote: > > > > Another major change is that we rem

Re: [PATCH v3 1/5] mm: add vm_insert_mixed_mkwrite()

2017-07-19 Thread Ross Zwisler
On Wed, Jul 19, 2017 at 11:51:12AM -0600, Ross Zwisler wrote: > On Wed, Jul 19, 2017 at 04:16:59PM +0200, Jan Kara wrote: > > On Wed 28-06-17 16:01:48, Ross Zwisler wrote: > > > To be able to use the common 4k zero page in DAX we need to have our PTE > > > fault path l

Re: [PATCH v3 1/5] mm: add vm_insert_mixed_mkwrite()

2017-07-19 Thread Ross Zwisler
On Wed, Jul 19, 2017 at 04:16:59PM +0200, Jan Kara wrote: > On Wed 28-06-17 16:01:48, Ross Zwisler wrote: > > To be able to use the common 4k zero page in DAX we need to have our PTE > > fault path look more like our PMD fault path where a PTE entry can be > > marked a

Re: [PATCH v3 3/5] dax: use common 4k zero page for dax mmap reads

2017-07-19 Thread Ross Zwisler
On Wed, Jul 19, 2017 at 05:33:14PM +0200, Jan Kara wrote: > On Wed 28-06-17 16:01:50, Ross Zwisler wrote: > > Another major change is that we remove dax_pfn_mkwrite() from our fault > > flow, and instead rely on the page fault itself to make the PTE dirty and > > writ

Re: [PATCH v3 0/5] DAX common 4k zero page

2017-06-30 Thread Ross Zwisler
On Wed, Jun 28, 2017 at 04:01:47PM -0600, Ross Zwisler wrote: > When servicing mmap() reads from file holes the current DAX code allocates > a page cache page of all zeroes and places the struct page pointer in the > mapping->page_tree radix tree. This has three major drawb

[PATCH v3 0/5] DAX common 4k zero page

2017-06-28 Thread Ross Zwisler
ity with get_unlocked_mapping_entry(). (Jan) - Remove DAX special casing in page_cache_tree_insert(), move now-private definitions from dax.h to dax.c. (Jan) Ross Zwisler (5): mm: add vm_insert_mixed_mkwrite() dax: relocate some dax functions dax: use common 4k zero page for dax mmap re

[PATCH v3 2/5] dax: relocate some dax functions

2017-06-28 Thread Ross Zwisler
-by: Ross Zwisler <ross.zwis...@linux.intel.com> --- fs/dax.c | 138 +++ 1 file changed, 69 insertions(+), 69 deletions(-) diff --git a/fs/dax.c b/fs/dax.c index 9187f3b..e850837 100644 --- a/fs/dax.c +++ b/fs/dax.c @@ -122,6 +

[PATCH v3 4/5] dax: remove DAX code from page_cache_tree_insert()

2017-06-28 Thread Ross Zwisler
Now that we no longer insert struct page pointers in DAX radix trees we can remove the special casing for DAX in page_cache_tree_insert(). This also allows us to make dax_wake_mapping_entry_waiter() local to fs/dax.c, removing it from dax.h. Signed-off-by: Ross Zwisler <ross.z

[PATCH v3 1/5] mm: add vm_insert_mixed_mkwrite()

2017-06-28 Thread Ross Zwisler
nsert_pfn() needs to follow the lead of insert_pfn_pmd() and allow us to pass in a 'mkwrite' flag. If 'mkwrite' is set insert_pfn() will do the work that was previously done by wp_page_reuse() as part of the dax_pfn_mkwrite() call path. Signed-off-by: Ross Zwisler <ross.zwis...@linux.intel.com&g

[PATCH v3 3/5] dax: use common 4k zero page for dax mmap reads

2017-06-28 Thread Ross Zwisler
() as part of the dax_pfn_mkwrite() call path. *** Signed-off-by: Ross Zwisler <ross.zwis...@linux.intel.com> --- Documentation/filesystems/dax.txt | 5 +- fs/dax.c | 243 -- fs/ext2/file.c| 25 +-

[PATCH v3 5/5] dax: move all DAX radix tree defs to fs/dax.c

2017-06-28 Thread Ross Zwisler
Now that we no longer insert struct page pointers in DAX radix trees the page cache code no longer needs to know anything about DAX exceptional entries. Move all the DAX exceptional entry definitions from dax.h to fs/dax.c. Signed-off-by: Ross Zwisler <ross.zwis...@linux.intel.com> Sug

Re: [PATCH v2 3/3] dax: use common 4k zero page for dax mmap reads

2017-06-16 Thread Ross Zwisler
On Thu, Jun 15, 2017 at 04:58:56PM +0200, Jan Kara wrote: > On Wed 14-06-17 11:22:11, Ross Zwisler wrote: > > @@ -216,17 +217,6 @@ static void dax_unlock_mapping_entry(struct > > address_space *mapping, > > dax_wake_mapping_entry_waiter(mapping, index, entry, false); >

Re: [PATCH v2 1/3] mm: add vm_insert_mixed_mkwrite()

2017-06-16 Thread Ross Zwisler
On Thu, Jun 15, 2017 at 04:42:04PM +0200, Jan Kara wrote: > On Wed 14-06-17 11:22:09, Ross Zwisler wrote: > > To be able to use the common 4k zero page in DAX we need to have our PTE > > fault path look more like our PMD fault path where a PTE entry can be > > marked a

[PATCH v2 0/3] DAX common 4k zero page

2017-06-14 Thread Ross Zwisler
ree, so if you could spare some review cycles I'd be grateful. --- Changes since v1: - Leave vm_insert_mixed() instact with previous functionality and add vm_insert_mixed_mkwrite() as a peer so it is more readable/greppable. (Dan) Ross Zwisler (3): mm: add vm_insert_mixed_mkwrite()

[PATCH v2 2/3] dax: relocate dax_load_hole()

2017-06-14 Thread Ross Zwisler
dax_load_hole() will soon need to call dax_insert_mapping_entry(), so it needs to be moved lower in dax.c so the definition exists. Signed-off-by: Ross Zwisler <ross.zwis...@linux.intel.com> --- fs/dax.c | 88 1 file chang

Re: [PATCH 1/3] mm: add vm_insert_mixed_mkwrite()

2017-06-11 Thread Ross Zwisler
On Fri, Jun 09, 2017 at 08:35:08PM -0700, Dan Williams wrote: > On Fri, Jun 9, 2017 at 8:03 PM, Ross Zwisler > <ross.zwis...@linux.intel.com> wrote: > > And vm_insert_mixed_mkwrite() and vm_insert_mixed() are redundant with only > > the insert_pfn() line differing?

Re: [PATCH 1/3] mm: add vm_insert_mixed_mkwrite()

2017-06-09 Thread Ross Zwisler
On Fri, Jun 09, 2017 at 02:23:51PM -0700, Dan Williams wrote: > On Wed, Jun 7, 2017 at 1:48 PM, Ross Zwisler > <ross.zwis...@linux.intel.com> wrote: > > To be able to use the common 4k zero page in DAX we need to have our PTE > > fault path look more like our PMD fault pa

[PATCH 3/3] dax: use common 4k zero page for dax mmap reads

2017-06-07 Thread Ross Zwisler
() as part of the dax_pfn_mkwrite() call path. *** Signed-off-by: Ross Zwisler <ross.zwis...@linux.intel.com> --- This series applies cleanly to v4.12-rc4 and has passed all my xfstesting using ext4, ext2 and XFS. It has also passed all my targeted testing. --- Documentation/filesystems/dax.txt

[PATCH 1/3] mm: add vm_insert_mixed_mkwrite()

2017-06-07 Thread Ross Zwisler
nsert_pfn() needs to follow the lead of insert_pfn_pmd() and allow us to pass in a 'mkwrite' flag. If 'mkwrite' is set insert_pfn() will do the work that was previously done by wp_page_reuse() as part of the dax_pfn_mkwrite() call path. Signed-off-by: Ross Zwisler <ross.zwis...@linux.intel.com&g

[PATCH 2/3] dax: relocate dax_load_hole()

2017-06-07 Thread Ross Zwisler
dax_load_hole() will soon need to call dax_insert_mapping_entry(), so it needs to be moved lower in dax.c so the definition exists. Signed-off-by: Ross Zwisler <ross.zwis...@linux.intel.com> --- fs/dax.c | 88 1 file chang

Re: [PATCH v5 08/17] dax: set errors in mapping when writeback fails

2017-06-05 Thread Ross Zwisler
only want to do this with errseq_t based > error handling to prevent seeing duplicate errors on fsync. > > Signed-off-by: Jeff Layton <jlay...@redhat.com> > Reviewed-by: Jan Kara <j...@suse.cz> > Reviewed-by: Christoph Hellwig <h...@lst.de> > Reviewed-and-Tested

Re: [PATCH v5 00/17] fs: introduce new writeback error reporting and convert ext2 and ext4 to use it

2017-06-01 Thread Ross Zwisler
On Wed, May 31, 2017 at 08:45:23AM -0400, Jeff Layton wrote: > v5: don't retrofit old API over the new infrastructure > add fstype flag to indicate how wb errors are tracked within that fs > add more function variants that take a errseq_t "since" value > add second errseq_t to struct

Re: [PATCH] dax : Fix documentation with respect to struct pages

2016-09-27 Thread Ross Zwisler
, thanks for updating this. Acked-by: Ross Zwisler <ross.zwis...@linux.intel.com> > --- > Documentation/filesystems/dax.txt | 15 +-- > 1 file changed, 9 insertions(+), 6 deletions(-) > > diff --git a/Documentation/filesystems/dax.txt > b/Documentation/filesy

[PATCH 2/2] dax: remote unused fault wrappers

2016-07-14 Thread Ross Zwisler
y added to ext2 and ext4 since DAX support was initially introduced by: commit 6b698edeeef0 ("xfs: add DAX file operations support") Signed-off-by: Ross Zwisler <ross.zwis...@linux.intel.com> --- fs/dax.c| 73 ++--- fs/e

[PATCH 1/2] dax: some small updates to dax.txt documentation

2016-07-14 Thread Ross Zwisler
txt. Signed-off-by: Ross Zwisler <ross.zwis...@linux.intel.com> --- Documentation/filesystems/dax.txt | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Documentation/filesystems/dax.txt b/Documentation/filesystems/dax.txt index ce4587d..0c16a22 100644 --- a/Documentati