Re: [PATCH 1/6] ext2: Return BH_New buffers for zeroed blocks

2016-11-29 Thread Ross Zwisler
gt; > Reviewed-by: Christoph Hellwig <h...@lst.de> > Signed-off-by: Jan Kara <j...@suse.cz> Reviewed-by: Ross Zwisler <ross.zwis...@linux.intel.com> ___ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm

Re: [PATCH 3/6] dax: add tracepoint infrastructure, PMD tracing

2016-11-28 Thread Ross Zwisler
On Fri, Nov 25, 2016 at 02:00:59PM +1100, Dave Chinner wrote: > On Wed, Nov 23, 2016 at 11:44:19AM -0700, Ross Zwisler wrote: > > Tracepoints are the standard way to capture debugging and tracing > > information in many parts of the kernel, including the XFS and ext4 > >

Re: [PATCH 1/1] libnvdimm, namespace: fix the type of name variable

2016-11-28 Thread Ross Zwisler
nd kmemdup() as if it > were char[NSLABEL_NAME_LEN]. Remove the star in the variable definition > to makes it look right. > > Signed-off-by: Nicolas Iooss <nicolas.iooss_li...@m4x.org> Yep, nice catch. Reviewed-by: Ross Zwisler <ross.zwis...@linux.intel.com>

Re: [PATCH 2/6] dax: remove leading space from labels

2016-11-28 Thread Ross Zwisler
On Thu, Nov 24, 2016 at 11:42:38AM -0800, Dan Williams wrote: > On Thu, Nov 24, 2016 at 1:11 AM, Jan Kara <j...@suse.cz> wrote: > > On Wed 23-11-16 11:44:18, Ross Zwisler wrote: > >> No functional change. > >> > >> As of this commit: > >> >

Re: [PATCH 1/6] dax: fix build breakage with ext4, dax and !iomap

2016-11-28 Thread Ross Zwisler
On Thu, Nov 24, 2016 at 10:02:39AM +0100, Jan Kara wrote: > On Wed 23-11-16 11:44:17, Ross Zwisler wrote: > > With the current Kconfig setup it is possible to have the following: > > > > CONFIG_EXT4_FS=y > > CONFIG_FS_DAX=y > > CONFIG_FS_IOMAP=n # this is in f

[PATCH 3/6] dax: add tracepoint infrastructure, PMD tracing

2016-11-23 Thread Ross Zwisler
0x10505000 vm_start 0x1020 vm_end 0x1070 pgoff 0x200 max_pgoff 0x1400 big-2057 [000] 136.397943: dax_pmd_fault_done: shared mapping write address 0x10505000 vm_start 0x1020 vm_end 0x1070 pgoff 0x200 max_pgoff 0x1400 NOPAGE Signed-off-by: Ross Zwisler <ross.zwis...@li

[PATCH 6/6] dax: add tracepoints to dax_pmd_insert_mapping()

2016-11-23 Thread Ross Zwisler
vm_start 0x1020 vm_end 0x1070 pgoff 0x200 max_pgoff 0x1400 NOPAGE Signed-off-by: Ross Zwisler <ross.zwis...@linux.intel.com> --- fs/dax.c | 10 +++--- include/linux/pfn_t.h | 6 ++ include/trace/events/fs_dax.

[PATCH 4/6] dax: update MAINTAINERS entries for FS DAX

2016-11-23 Thread Ross Zwisler
Add the new include/trace/events/fs_dax.h tracepoint header, update Matthew's email address and add myself as a maintainer for filesystem DAX. Signed-off-by: Ross Zwisler <ross.zwis...@linux.intel.com> Suggested-by: Matthew Wilcox <mawil...@microsoft.com> --- MAINTAINERS | 4 +++- 1

[PATCH 5/6] dax: add tracepoints to dax_pmd_load_hole()

2016-11-23 Thread Ross Zwisler
0x1020 vm_end 0x1060 pgoff 0x200 max_pgoff 0x1400 NOPAGE Signed-off-by: Ross Zwisler <ross.zwis...@linux.intel.com> --- fs/dax.c | 13 + include/trace/events/fs_dax.h | 32 2 files changed, 41 insertions(+), 4 del

[PATCH 1/6] dax: fix build breakage with ext4, dax and !iomap

2016-11-23 Thread Ross Zwisler
ruct buffer_head based DAX fault paths and I/O path have been removed we really depend on iomap support being present for DAX. Make this explicit by selecting FS_IOMAP if we compile in DAX support. Signed-off-by: Ross Zwisler <ross.zwis...@linux.intel.com> --- fs/Kconfig | 1 + fs/dax.c

Re: [PATCH 10/20] mm: Move handling of COW faults into DAX code

2016-11-20 Thread Ross Zwisler
to fs/dax.c. > > Acked-by: Kirill A. Shutemov <kirill.shute...@linux.intel.com> > Signed-off-by: Jan Kara <j...@suse.cz> Reviewed-by: Ross Zwisler <ross.zwis...@linux.intel.com> ___ Linux-nvdimm mailing list Linux-nvdimm@lists.01.or

Re: [PATCH 10/21] mm: Move handling of COW faults into DAX code

2016-11-16 Thread Ross Zwisler
On Fri, Nov 04, 2016 at 05:25:06AM +0100, Jan Kara wrote: > Move final handling of COW faults from generic code into DAX fault > handler. That way generic code doesn't have to be aware of peculiarities > of DAX locking so remove that knowledge and make locking functions > private to fs/dax.c. > >

Re: [PATCH 07/21] mm: Add orig_pte field into vm_fault

2016-11-16 Thread Ross Zwisler
On Fri, Nov 04, 2016 at 05:25:03AM +0100, Jan Kara wrote: > Add orig_pte field to vm_fault structure to allow ->page_mkwrite > handlers to fully handle the fault. This also allows us to save some > passing of extra arguments around. > > Signed-off-by: Jan Kara <j...@suse.c

[PATCH 1/2] ndctl: add information about size suffixes to docs

2016-11-09 Thread Ross Zwisler
Add information about the supported size suffixes to the documentation for ndctl-create-namespace. This prevents users from doing silly things like $((32*1024*1024*1024)) on the command line when running ndctl commands. Signed-off-by: Ross Zwisler <ross.zwis...@linux.intel.

[PATCH 2/2] ndctl: fix return value for disable-namespace

2016-11-09 Thread Ross Zwisler
On success the "ndctl disable-namespace" returns the number of namespaces that were disabled to the shell as an exit value. This non-zero value is interpreted by the shell as an error. Fix this by returning 0 on success, just like all the other ndctl commands. Signed-off-by: Ro

Re: [PATCH 01/11] ext4: Factor out checks from ext4_file_write_iter()

2016-11-03 Thread Ross Zwisler
On Tue, Nov 01, 2016 at 10:06:11PM +0100, Jan Kara wrote: > Factor out checks of 'from' and whether we are overwriting out of > ext4_file_write_iter() so that the function is easier to follow. > > Signed-off-by: Jan Kara > --- > fs/ext4/file.c | 97 >

Re: [PATCH v9 00/16] re-enable DAX PMD support

2016-11-03 Thread Ross Zwisler
On Thu, Nov 03, 2016 at 12:58:26PM +1100, Dave Chinner wrote: > On Tue, Nov 01, 2016 at 01:54:02PM -0600, Ross Zwisler wrote: > > DAX PMDs have been disabled since Jan Kara introduced DAX radix tree based > > locking. This series allows DAX PMDs to participate in the DAX radix

Re: [PATCH 0/11] ext4: Convert ext4 DAX IO to iomap framework

2016-11-01 Thread Ross Zwisler
On Wed, Nov 02, 2016 at 09:12:35AM +1100, Dave Chinner wrote: > On Tue, Nov 01, 2016 at 10:06:10PM +0100, Jan Kara wrote: > > Hello, > > > > this patch set converts ext4 DAX IO paths to the new iomap framework and > > removes the old bh-based DAX functions. As a result ext4 gains PMD page > >

[PATCH v9 11/16] dax: dax_iomap_fault() needs to call iomap_end()

2016-11-01 Thread Ross Zwisler
balanced allocations, locks, etc. So, add calls to iomap_end() with appropriate error handling to dax_iomap_fault(). Signed-off-by: Ross Zwisler <ross.zwis...@linux.intel.com> Suggested-by: Jan Kara <j...@suse.cz> Reviewed-by: Jan Kara <j...@suse.cz>

[PATCH v9 10/16] dax: add dax_iomap_sector() helper function

2016-11-01 Thread Ross Zwisler
it out into a helper function. Signed-off-by: Ross Zwisler <ross.zwis...@linux.intel.com> Reviewed-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Jan Kara <j...@suse.cz> --- fs/dax.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/fs/dax.c b/fs/d

[PATCH v9 13/16] dax: move put_(un)locked_mapping_entry() in dax.c

2016-11-01 Thread Ross Zwisler
No functional change. The static functions put_locked_mapping_entry() and put_unlocked_mapping_entry() will soon be used in error cases in grab_mapping_entry(), so move their definitions above this function. Signed-off-by: Ross Zwisler <ross.zwis...@linux.intel.com> Reviewed-by: Jan K

[PATCH v9 07/16] dax: coordinate locking for offsets in PMD range

2016-11-01 Thread Ross Zwisler
. To accomplish this, for ranges covered by a PMD entry we will instead lock based on the page offset of the beginning of the PMD entry. The 'mapping' pointer is still used in the same way. Signed-off-by: Ross Zwisler <ross.zwis...@linux.intel.com> Reviewed-by: Christoph Hellwig <h...@lst.de&

Re: Infinite loop with DAX PMD faults

2016-10-28 Thread Ross Zwisler
On Fri, Oct 28, 2016 at 10:02:36AM +0200, Jan Kara wrote: > On Thu 27-10-16 13:54:49, Ross Zwisler wrote: > > On Thu, Oct 27, 2016 at 09:07:50PM +0200, Jan Kara wrote: > > > When testing my DAX patches rebased on top of Ross' DAX PMD series, I've > > > come across the f

Re: Infinite loop with DAX PMD faults

2016-10-27 Thread Ross Zwisler
On Thu, Oct 27, 2016 at 09:48:41PM +, Kani, Toshimitsu wrote: > On Thu, 2016-10-27 at 15:03 -0600, Ross Zwisler wrote: > > On Thu, Oct 27, 2016 at 12:46:32PM -0700, Dan Williams wrote: > > > > > > On Thu, Oct 27, 2016 at 12:07 PM, Jan Kara <j...@suse.cz&

Re: Infinite loop with DAX PMD faults

2016-10-27 Thread Ross Zwisler
On Thu, Oct 27, 2016 at 12:46:32PM -0700, Dan Williams wrote: > On Thu, Oct 27, 2016 at 12:07 PM, Jan Kara wrote: > > Hello, > > > > When testing my DAX patches rebased on top of Ross' DAX PMD series, I've > > come across the following issue with generic/344 test from xfstests. The

Re: Infinite loop with DAX PMD faults

2016-10-27 Thread Ross Zwisler
On Thu, Oct 27, 2016 at 09:07:50PM +0200, Jan Kara wrote: > Hello, > > When testing my DAX patches rebased on top of Ross' DAX PMD series, I've > come across the following issue with generic/344 test from xfstests. The > test ends in an infinite fault loop when we fault index 0 over and over >

Re: [PATCH v8 00/16] re-enable DAX PMD support

2016-10-27 Thread Ross Zwisler
On Wed, Oct 19, 2016 at 01:34:19PM -0600, Ross Zwisler wrote: > DAX PMDs have been disabled since Jan Kara introduced DAX radix tree based > locking. This series allows DAX PMDs to participate in the DAX radix tree > based locking scheme so that they can be re-enabled. > > C

Re: [PATCH] nvdimm: make CONFIG_NVDIMM_DAX 'bool'

2016-10-25 Thread Ross Zwisler
one built-in if the > rest is a module. > > Fixes: 4e65e9381c7a ("/dev/dax: fix Kconfig dependency build breakage") > Signed-off-by: Arnd Bergmann <a...@arndb.de> Reviewed-by: Ross Zwisler <ross.zwis...@linux.intel.com> ___ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm

[PATCH v8 08/16] dax: remove dax_pmd_fault()

2016-10-19 Thread Ross Zwisler
dax_pmd_fault() is the old struct buffer_head + get_block_t based 2 MiB DAX fault handler. This fault handler has been disabled for several kernel releases, and support for PMDs will be reintroduced using the struct iomap interface instead. Signed-off-by: Ross Zwisler <ross.z

[PATCH v8 10/16] dax: add dax_iomap_sector() helper function

2016-10-19 Thread Ross Zwisler
it out into a helper function. Signed-off-by: Ross Zwisler <ross.zwis...@linux.intel.com> Reviewed-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Jan Kara <j...@suse.cz> --- fs/dax.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/fs/dax.c b/fs/d

[PATCH v8 11/16] dax: dax_iomap_fault() needs to call iomap_end()

2016-10-19 Thread Ross Zwisler
balanced allocations, locks, etc. So, add calls to iomap_end() with appropriate error handling to dax_iomap_fault(). Signed-off-by: Ross Zwisler <ross.zwis...@linux.intel.com> Suggested-by: Jan Kara <j...@suse.cz> Reviewed-by: Jan Kara <j...@suse.cz>

[PATCH v8 14/16] dax: add struct iomap based DAX PMD support

2016-10-19 Thread Ross Zwisler
insert the 2MiB entry. We can solve this problem if we need to, but I think that the cases where both 2MiB entries and 4K entries are being used for the same range will be rare enough and the gain small enough that it probably won't be worth the complexity. Signed-off-by: Ross Zwisler <

[PATCH v8 12/16] dax: move RADIX_DAX_* defines to dax.h

2016-10-19 Thread Ross Zwisler
entry. Instead of shifting the defines between dax.c and dax.h as they are individually used in other code, just move them wholesale to dax.h so they'll be available when we need them. Signed-off-by: Ross Zwisler <ross.zwis...@linux.intel.com> Reviewed-by: Christoph Hellwig <h...@lst.de&

[PATCH v8 16/16] dax: remove "depends on BROKEN" from FS_DAX_PMD

2016-10-19 Thread Ross Zwisler
Now that DAX PMD faults are once again working and are now participating in DAX's radix tree locking scheme, allow their config option to be enabled. Signed-off-by: Ross Zwisler <ross.zwis...@linux.intel.com> Reviewed-by: Jan Kara <j...@suse.cz> --- fs/Kconfig | 1 - 1 file changed

[PATCH v8 13/16] dax: move put_(un)locked_mapping_entry() in dax.c

2016-10-19 Thread Ross Zwisler
No functional change. The static functions put_locked_mapping_entry() and put_unlocked_mapping_entry() will soon be used in error cases in grab_mapping_entry(), so move their definitions above this function. Signed-off-by: Ross Zwisler <ross.zwis...@linux.intel.com> Reviewed-by: Jan K

[PATCH v8 09/16] dax: correct dax iomap code namespace

2016-10-19 Thread Ross Zwisler
them to dax_iomap_rw(), dax_iomap_fault() and dax_iomap_actor() respectively. Signed-off-by: Ross Zwisler <ross.zwis...@linux.intel.com> Suggested-by: Dave Chinner <da...@fromorbit.com> Reviewed-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Jan Kara <j...@suse.cz> --- fs/dax

[PATCH v8 06/16] dax: consistent variable naming for DAX entries

2016-10-19 Thread Ross Zwisler
No functional change. Consistently use the variable name 'entry' instead of 'ret' for DAX radix tree entries. This was already happening in most of the code, so update get_unlocked_mapping_entry(), grab_mapping_entry() and dax_unlock_mapping_entry(). Signed-off-by: Ross Zwisler <ross.z

[PATCH v8 05/16] dax: remove the last BUG_ON() from fs/dax.c

2016-10-19 Thread Ross Zwisler
Don't take down the kernel if we get an invalid 'from' and 'length' argument pair. Just warn once and return an error. Signed-off-by: Ross Zwisler <ross.zwis...@linux.intel.com> Reviewed-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Jan Kara <j...@suse.cz> --- fs/dax

[PATCH v8 00/16] re-enable DAX PMD support

2016-10-19 Thread Ross Zwisler
. - Added Reviewed-by tags from Jan Kara. Here is a tree containing my changes: https://git.kernel.org/cgit/linux/kernel/git/zwisler/linux.git/log/?h=dax_pmd_v8 Ross Zwisler (16): ext4: tell DAX the size of allocation holes dax: remove buffer_size_valid() ext2: remove support for DAX PMD

[PATCH v8 02/16] dax: remove buffer_size_valid()

2016-10-19 Thread Ross Zwisler
Now that ext4 properly sets bh.b_size when we call get_block() for a hole, rely on that value and remove the buffer_size_valid() sanity check. Signed-off-by: Ross Zwisler <ross.zwis...@linux.intel.com> Reviewed-by: Jan Kara <j...@suse.cz> Reviewed-by: Christoph Hellwig <h...@lst.de

Re: [PATCH 19/20] dax: Protect PTE modification on WP fault by radix tree entry lock

2016-10-19 Thread Ross Zwisler
On Wed, Oct 19, 2016 at 09:25:05AM +0200, Jan Kara wrote: > On Tue 18-10-16 13:53:32, Ross Zwisler wrote: > > On Tue, Sep 27, 2016 at 06:08:23PM +0200, Jan Kara wrote: > > > - void *entry; > > > + void *entry, **slot; > > > pgoff_t index = vmf->pgoff; &

Re: [PATCH 16/20] mm: Provide helper for finishing mkwrite faults

2016-10-19 Thread Ross Zwisler
On Wed, Oct 19, 2016 at 09:16:00AM +0200, Jan Kara wrote: > On Tue 18-10-16 12:35:25, Ross Zwisler wrote: > > On Tue, Sep 27, 2016 at 06:08:20PM +0200, Jan Kara wrote: > > > Provide a helper function for finishing write faults due to PTE being > > > read-only. The

Re: [PATCH 20/20] dax: Clear dirty entry tags on cache flush

2016-10-18 Thread Ross Zwisler
rty tag when flushing caches for corresponding address range. > Similarly to page_mkclean() we also have to write-protect pages to get a > page fault when the page is next written to so that we can mark the > entry dirty again. > > Signed-off-by: Jan Kara <j...@suse.cz> Looks g

Re: [PATCH 17/20] mm: Export follow_pte()

2016-10-18 Thread Ross Zwisler
On Tue, Sep 27, 2016 at 06:08:21PM +0200, Jan Kara wrote: > DAX will need to implement its own version of page_check_address(). To > avoid duplicating page table walking code, export follow_pte() which > does what we need. > > Signed-off-by: Jan Kara <j...@suse.cz> Revi

Re: [PATCH 16/20] mm: Provide helper for finishing mkwrite faults

2016-10-18 Thread Ross Zwisler
te)) { > + tmp = finish_mkwrite_fault(vmf); > + if (unlikely(!tmp || (tmp & > + (VM_FAULT_ERROR | VM_FAULT_NOPAGE { The 'tmp' return from finish_mkwrite_fault() can only be 0 or

Re: [PATCH 15/20] mm: Move part of wp_page_reuse() into the single call site

2016-10-18 Thread Ross Zwisler
locked page, sometimes unlocked etc. > > Signed-off-by: Jan Kara <j...@suse.cz> Reviewed-by: Ross Zwisler <ross.zwis...@linux.intel.com> ___ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm

Re: [PATCH 12/20] mm: Factor out common parts of write fault handling

2016-10-18 Thread Ross Zwisler
On Tue, Oct 18, 2016 at 12:50:00PM +0200, Jan Kara wrote: > On Mon 17-10-16 16:08:51, Ross Zwisler wrote: > > On Tue, Sep 27, 2016 at 06:08:16PM +0200, Jan Kara wrote: > > > Currently we duplicate handling of shared write faults in > > > wp_page_reuse() and do_shar

Re: [PATCH 12/20] mm: Factor out common parts of write fault handling

2016-10-17 Thread Ross Zwisler
On Tue, Sep 27, 2016 at 06:08:16PM +0200, Jan Kara wrote: > Currently we duplicate handling of shared write faults in > wp_page_reuse() and do_shared_fault(). Factor them out into a common > function. > > Signed-off-by: Jan Kara > --- > mm/memory.c | 78 >

Re: [PATCH 10/20] mm: Move handling of COW faults into DAX code

2016-10-17 Thread Ross Zwisler
On Tue, Sep 27, 2016 at 06:08:14PM +0200, Jan Kara wrote: > Move final handling of COW faults from generic code into DAX fault > handler. That way generic code doesn't have to be aware of peculiarities > of DAX locking so remove that knowledge. > > Signed-off-by: Jan Kara > --- >

Re: [PATCH 0/20 v3] dax: Clear dirty bits after flushing caches

2016-10-17 Thread Ross Zwisler
On Mon, Oct 17, 2016 at 10:47:32AM +0200, Jan Kara wrote: > This week I plan to rebase both series on top of rc1 + your THP patches so > that we can move on with merging the stuff. Yea...so how are we going to coordinate merging of these series for the v4.10 merge window? My series mostly

Re: [PATCH 09/20] mm: Factor out functionality to finish page faults

2016-10-17 Thread Ross Zwisler
sorry, I did have one bit of feedback. Maybe added parens around the flag check for readability: if ((vmf->flags & FAULT_FLAG_WRITE) && !(vmf->vma->vm_flags & VM_SHARED)) Aside from that one nit: Reviewed-by: Ross Zwisler <ross.zwis...@linux.intel.com> ___ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm

Re: [PATCH 09/20] mm: Factor out functionality to finish page faults

2016-10-17 Thread Ross Zwisler
o avoid some boilerplate code. > > Signed-off-by: Jan Kara <j...@suse.cz> Reviewed-by: Ross Zwisler <ross.zwis...@linux.intel.com> ___ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm

Re: [PATCH v2] DAX: enable iostat for read/write

2016-10-17 Thread Ross Zwisler
t; Note, iostat still does not support the DAX mmap path as it allows > user applications to access directly. > > Signed-off-by: Toshi Kani <toshi.k...@hpe.com> > Cc: Andrew Morton <a...@linux-foundation.org> > Cc: Alexander Viro <v...@zeniv.linux.org.uk> > Cc: D

Re: [PATCH 08/20] mm: Allow full handling of COW faults in ->fault handlers

2016-10-17 Thread Ross Zwisler
emove knowledge about special DAX locking from the generic fault code. > > Signed-off-by: Jan Kara <j...@suse.cz> Reviewed-by: Ross Zwisler <ross.zwis...@linux.intel.com> ___ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://li

Re: [PATCH 06/20] mm: Use pass vm_fault structure for in wp_pfn_shared()

2016-10-14 Thread Ross Zwisler
On Tue, Sep 27, 2016 at 06:08:10PM +0200, Jan Kara wrote: > Instead of creating another vm_fault structure, use the one passed to > wp_pfn_shared() for passing arguments into pfn_mkwrite handler. > > Signed-off-by: Jan Kara <j...@suse.cz> Reviewed-by: Ross Zwisler <ross.zw

Re: [PATCH 04/20] mm: Use passed vm_fault structure in __do_fault()

2016-10-14 Thread Ross Zwisler
On Tue, Sep 27, 2016 at 06:08:08PM +0200, Jan Kara wrote: > Instead of creating another vm_fault structure, use the one passed to > __do_fault() for passing arguments into fault handler. > > Signed-off-by: Jan Kara <j...@suse.cz> Reviewed-by: Ross Zwisler <ross.zw

Re: [PATCH 03/20] mm: Use pgoff in struct vm_fault instead of passing it separately

2016-10-14 Thread Ross Zwisler
eed to do to fix this is initialize .pgoff in __collapse_huge_page_swapin(). With this one change: Reviewed-by: Ross Zwisler <ross.zwis...@linux.intel.com> ___ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm

Re: [PATCH 01/20] mm: Change type of vmf->virtual_address

2016-10-14 Thread Ross Zwisler
..@suse.cz> Reviewed-by: Ross Zwisler <ross.zwis...@linux.intel.com> ___ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm

Re: [PATCH 0/20 v3] dax: Clear dirty bits after flushing caches

2016-10-13 Thread Ross Zwisler
On Mon, Oct 03, 2016 at 01:13:58PM +0200, Jan Kara wrote: > On Mon 03-10-16 02:32:48, Christoph Hellwig wrote: > > On Mon, Oct 03, 2016 at 10:15:49AM +0200, Jan Kara wrote: > > > Yeah, so DAX path is special because it installs its own PTE directly from > > > the fault handler which we don't do in

Re: [PATCH v6 15/17] dax: add struct iomap based DAX PMD support

2016-10-13 Thread Ross Zwisler
On Thu, Oct 13, 2016 at 05:42:24PM +0200, Jan Kara wrote: > On Wed 12-10-16 16:50:20, Ross Zwisler wrote: > > DAX PMDs have been disabled since Jan Kara introduced DAX radix tree based > > locking. This patch allows DAX PMDs to participate in the DAX radix tree > > ba

[PATCH v7 15/17] dax: add struct iomap based DAX PMD support

2016-10-13 Thread Ross Zwisler
insert the 2MiB entry. We can solve this problem if we need to, but I think that the cases where both 2MiB entries and 4K entries are being used for the same range will be rare enough and the gain small enough that it probably won't be worth the complexity. Signed-off-by: Ross Zwisler <

Re: [PATCH] pmem: report error on clear poison failure

2016-10-13 Thread Ross Zwisler
On Thu, Oct 13, 2016 at 06:16:29PM +, Kani, Toshimitsu wrote: > On Thu, 2016-10-13 at 10:22 -0700, Dan Williams wrote: > > On Thu, Oct 13, 2016 at 9:08 AM, Kani, Toshimitsu > > wrote: > > > > > > On Thu, 2016-10-13 at 09:01 -0700, Dan Williams wrote: > > > > > > > > On

[PATCH v6 04/17] ext2: remove support for DAX PMD faults

2016-10-12 Thread Ross Zwisler
Ds, remove support so that we don't have an untested code path that we may someday traverse when we happen to get an aligned block allocation. This should also make 4k DAX faults in ext2 a bit faster since they will no longer have to call the PMD fault handler only to get a response of VM_FAULT_FALLBACK.

[PATCH v6 01/17] ext4: allow DAX writeback for hole punch

2016-10-12 Thread Ross Zwisler
Currently when doing a DAX hole punch with ext4 we fail to do a writeback. This is because the logic around filemap_write_and_wait_range() in ext4_punch_hole() only looks for dirty page cache pages in the radix tree, not for dirty DAX exceptional entries. Signed-off-by: Ross Zwisler <ross.z

[PATCH v6 13/17] dax: move RADIX_DAX_* defines to dax.h

2016-10-12 Thread Ross Zwisler
entry. Instead of shifting the defines between dax.c and dax.h as they are individually used in other code, just move them wholesale to dax.h so they'll be available when we need them. Signed-off-by: Ross Zwisler <ross.zwis...@linux.intel.com> Reviewed-by: Christoph Hellwig <h...@lst.de&

[PATCH v6 12/17] dax: dax_iomap_fault() needs to call iomap_end()

2016-10-12 Thread Ross Zwisler
balanced allocations, locks, etc. So, add calls to iomap_end() with appropriate error handling to dax_iomap_fault(). Signed-off-by: Ross Zwisler <ross.zwis...@linux.intel.com> Suggested-by: Jan Kara <j...@suse.cz> Reviewed-by: Jan Kara <j...@suse.cz>

[PATCH v6 02/17] ext4: tell DAX the size of allocation holes

2016-10-12 Thread Ross Zwisler
remove buffer_size_valid() in a later patch. Signed-off-by: Ross Zwisler <ross.zwis...@linux.intel.com> Reviewed-by: Jan Kara <j...@suse.cz> --- fs/ext4/inode.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 0900cb4..9075fac 100644 --- a/fs/ext4/ino

[PATCH v6 17/17] dax: remove "depends on BROKEN" from FS_DAX_PMD

2016-10-12 Thread Ross Zwisler
Now that DAX PMD faults are once again working and are now participating in DAX's radix tree locking scheme, allow their config option to be enabled. Signed-off-by: Ross Zwisler <ross.zwis...@linux.intel.com> --- fs/Kconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/fs/Kconfi

[PATCH v6 08/17] dax: coordinate locking for offsets in PMD range

2016-10-12 Thread Ross Zwisler
. To accomplish this, for ranges covered by a PMD entry we will instead lock based on the page offset of the beginning of the PMD entry. The 'mapping' pointer is still used in the same way. Signed-off-by: Ross Zwisler <ross.zwis...@linux.intel.com> Reviewed-by: Christoph Hellwig <h...@lst.de&

[PATCH v6 10/17] dax: correct dax iomap code namespace

2016-10-12 Thread Ross Zwisler
them to dax_iomap_rw(), dax_iomap_fault() and dax_iomap_actor() respectively. Signed-off-by: Ross Zwisler <ross.zwis...@linux.intel.com> Suggested-by: Dave Chinner <da...@fromorbit.com> Reviewed-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Jan Kara <j...@suse.cz> --- fs/dax

[PATCH v6 03/17] dax: remove buffer_size_valid()

2016-10-12 Thread Ross Zwisler
Now that ext4 properly sets bh.b_size when we call get_block() for a hole, rely on that value and remove the buffer_size_valid() sanity check. Signed-off-by: Ross Zwisler <ross.zwis...@linux.intel.com> Reviewed-by: Jan Kara <j...@suse.cz> Reviewed-by: Christoph Hellwig <h...@lst.de

[PATCH v6 16/17] xfs: use struct iomap based DAX PMD fault path

2016-10-12 Thread Ross Zwisler
Switch xfs_filemap_pmd_fault() from using dax_pmd_fault() to the new and improved dax_iomap_pmd_fault(). Also, now that it has no more users, remove xfs_get_blocks_dax_fault(). Signed-off-by: Ross Zwisler <ross.zwis...@linux.intel.com> Reviewed-by: Jan Kara <j...@suse.cz> --- fs/xf

[PATCH v6 15/17] dax: add struct iomap based DAX PMD support

2016-10-12 Thread Ross Zwisler
insert the 2MiB entry. We can solve this problem if we need to, but I think that the cases where both 2MiB entries and 4K entries are being used for the same range will be rare enough and the gain small enough that it probably won't be worth the complexity. Signed-off-by: Ross Zwisler <

[PATCH v6 07/17] dax: consistent variable naming for DAX entries

2016-10-12 Thread Ross Zwisler
No functional change. Consistently use the variable name 'entry' instead of 'ret' for DAX radix tree entries. This was already happening in most of the code, so update get_unlocked_mapping_entry(), grab_mapping_entry() and dax_unlock_mapping_entry(). Signed-off-by: Ross Zwisler <ross.z

[PATCH v6 05/17] dax: make 'wait_table' global variable static

2016-10-12 Thread Ross Zwisler
The global 'wait_table' variable is only used within fs/dax.c, and generates the following sparse warning: fs/dax.c:39:19: warning: symbol 'wait_table' was not declared. Should it be static? Make it static so it has scope local to fs/dax.c, and to make sparse happy. Signed-off-by: Ross Zwisler

[PATCH v6 06/17] dax: remove the last BUG_ON() from fs/dax.c

2016-10-12 Thread Ross Zwisler
Don't take down the kernel if we get an invalid 'from' and 'length' argument pair. Just warn once and return an error. Signed-off-by: Ross Zwisler <ross.zwis...@linux.intel.com> Reviewed-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Jan Kara <j...@suse.cz> --- fs/dax

[PATCH v6 09/17] dax: remove dax_pmd_fault()

2016-10-12 Thread Ross Zwisler
dax_pmd_fault() is the old struct buffer_head + get_block_t based 2 MiB DAX fault handler. This fault handler has been disabled for several kernel releases, and support for PMDs will be reintroduced using the struct iomap interface instead. Signed-off-by: Ross Zwisler <ross.z

Re: [PATCH v5 15/17] dax: add struct iomap based DAX PMD support

2016-10-11 Thread Ross Zwisler
On Mon, Oct 10, 2016 at 05:59:17PM +0200, Christoph Hellwig wrote: > On Fri, Oct 07, 2016 at 03:09:02PM -0600, Ross Zwisler wrote: > > - if (RADIX_DAX_TYPE(entry) == RADIX_DAX_PMD) > > + if ((unsigned long)entry & RADIX_DAX_PMD) > > Please introduce a proper in

Re: [PATCH v5 15/17] dax: add struct iomap based DAX PMD support

2016-10-10 Thread Ross Zwisler
On Mon, Oct 10, 2016 at 05:59:17PM +0200, Christoph Hellwig wrote: > On Fri, Oct 07, 2016 at 03:09:02PM -0600, Ross Zwisler wrote: > > - if (RADIX_DAX_TYPE(entry) == RADIX_DAX_PMD) > > + if ((unsigned long)entry & RADIX_DAX_PMD) > > Please introduce a proper in

Re: [PATCH v5 13/17] dax: dax_iomap_fault() needs to call iomap_end()

2016-10-10 Thread Ross Zwisler
On Mon, Oct 10, 2016 at 05:50:04PM +0200, Christoph Hellwig wrote: > On Fri, Oct 07, 2016 at 03:09:00PM -0600, Ross Zwisler wrote: > > Currently iomap_end() doesn't do anything for DAX page faults for both ext2 > > and XFS. ext2_iomap_end() just checks for a

[PATCH v5 07/17] dax: remove the last BUG_ON() from fs/dax.c

2016-10-07 Thread Ross Zwisler
Don't take down the kernel if we get an invalid 'from' and 'length' argument pair. Just warn once and return an error. Signed-off-by: Ross Zwisler <ross.zwis...@linux.intel.com> --- fs/dax.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/dax.c b/fs/dax.c index a

[PATCH v5 13/17] dax: dax_iomap_fault() needs to call iomap_end()

2016-10-07 Thread Ross Zwisler
balanced allocations, locks, etc. So, add calls to iomap_end() with appropriate error handling to dax_iomap_fault(). Signed-off-by: Ross Zwisler <ross.zwis...@linux.intel.com> Suggested-by: Jan Kara <j...@suse.cz> --- fs/dax.c | 31 --- 1 file changed, 2

[PATCH v5 06/17] dax: make 'wait_table' global variable static

2016-10-07 Thread Ross Zwisler
The global 'wait_table' variable is only used within fs/dax.c, and generates the following sparse warning: fs/dax.c:39:19: warning: symbol 'wait_table' was not declared. Should it be static? Make it static so it has scope local to fs/dax.c, and to make sparse happy. Signed-off-by: Ross Zwisler

[PATCH v5 09/17] dax: coordinate locking for offsets in PMD range

2016-10-07 Thread Ross Zwisler
. To accomplish this, for ranges covered by a PMD entry we will instead lock based on the page offset of the beginning of the PMD entry. The 'mapping' pointer is still used in the same way. Signed-off-by: Ross Zwisler <ross.zwis...@linux.intel.com> --- fs/dax.c

[PATCH v5 08/17] dax: consistent variable naming for DAX entries

2016-10-07 Thread Ross Zwisler
No functional change. Consistently use the variable name 'entry' instead of 'ret' for DAX radix tree entries. This was already happening in most of the code, so update get_unlocked_mapping_entry(), grab_mapping_entry() and dax_unlock_mapping_entry(). Signed-off-by: Ross Zwisler <ross.z

[PATCH v5 10/17] dax: remove dax_pmd_fault()

2016-10-07 Thread Ross Zwisler
dax_pmd_fault() is the old struct buffer_head + get_block_t based 2 MiB DAX fault handler. This fault handler has been disabled for several kernel releases, and support for PMDs will be reintroduced using the struct iomap interface instead. Signed-off-by: Ross Zwisler <ross.z

[PATCH v5 15/17] dax: add struct iomap based DAX PMD support

2016-10-07 Thread Ross Zwisler
insert the 2MiB entry. We can solve this problem if we need to, but I think that the cases where both 2MiB entries and 4K entries are being used for the same range will be rare enough and the gain small enough that it probably won't be worth the complexity. Signed-off-by: Ross Zwisler <

[PATCH v5 11/17] dax: correct dax iomap code namespace

2016-10-07 Thread Ross Zwisler
them to dax_iomap_rw(), dax_iomap_fault() and dax_iomap_actor() respectively. Signed-off-by: Ross Zwisler <ross.zwis...@linux.intel.com> Suggested-by: Dave Chinner <da...@fromorbit.com> Reviewed-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Jan Kara <j...@suse.cz> --- fs/dax

[PATCH v5 17/17] dax: remove "depends on BROKEN" from FS_DAX_PMD

2016-10-07 Thread Ross Zwisler
Now that DAX PMD faults are once again working and are now participating in DAX's radix tree locking scheme, allow their config option to be enabled. Signed-off-by: Ross Zwisler <ross.zwis...@linux.intel.com> --- fs/Kconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/fs/Kconfi

[PATCH v5 05/17] ext2: return -EIO on ext2_iomap_end() failure

2016-10-07 Thread Ross Zwisler
Right now we just return 0 for success, but we really want to let callers know about this failure. Signed-off-by: Ross Zwisler <ross.zwis...@linux.intel.com> --- fs/ext2/inode.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fs/ext2/inode.c b/fs/ext2/inode.c index c

[PATCH v5 00/17] re-enable DAX PMD support

2016-10-07 Thread Ross Zwisler
maxb=1410.4MB/s, mint=727msec, maxt=727msec This was done on a random lab machine with a PMEM device made from memmap'd RAM. To get XFS to use PMD faults, I did the following: mkfs.xfs -f -d su=2m,sw=1 /dev/pmem0 mount -o dax /dev/pmem0 /mnt/pmem0 xfs_io -c "extsize 2m" /mnt

[PATCH v5 01/17] ext4: allow DAX writeback for hole punch

2016-10-07 Thread Ross Zwisler
Currently when doing a DAX hole punch with ext4 we fail to do a writeback. This is because the logic around filemap_write_and_wait_range() in ext4_punch_hole() only looks for dirty page cache pages in the radix tree, not for dirty DAX exceptional entries. Signed-off-by: Ross Zwisler <ross.z

Re: [PATCH v4 00/12] re-enable DAX PMD support

2016-10-03 Thread Ross Zwisler
On Fri, Sep 30, 2016 at 09:43:45AM +1000, Dave Chinner wrote: > On Thu, Sep 29, 2016 at 04:49:18PM -0600, Ross Zwisler wrote: > > DAX PMDs have been disabled since Jan Kara introduced DAX radix tree based > > locking. This series allows DAX PMDs to participate in the DAX radix

Re: [PATCH v4 10/12] dax: add struct iomap based DAX PMD support

2016-10-03 Thread Ross Zwisler
On Fri, Sep 30, 2016 at 02:56:27AM -0700, Christoph Hellwig wrote: > > -/* > > - * We use lowest available bit in exceptional entry for locking, other two > > - * bits to determine entry type. In total 3 special bits. > > - */ > > -#define RADIX_DAX_SHIFT(RADIX_TREE_EXCEPTIONAL_SHIFT + 3) > >

Re: [PATCH v4 00/12] re-enable DAX PMD support

2016-10-03 Thread Ross Zwisler
On Thu, Sep 29, 2016 at 09:00:55PM -0700, Darrick J. Wong wrote: > On Thu, Sep 29, 2016 at 09:03:43PM -0600, Ross Zwisler wrote: > > On Fri, Sep 30, 2016 at 09:43:45AM +1000, Dave Chinner wrote: > > > Finally: none of the patches in your tree have reviewed-by tags. > > >

Re: [PATCH v4 00/12] re-enable DAX PMD support

2016-09-29 Thread Ross Zwisler
On Fri, Sep 30, 2016 at 09:43:45AM +1000, Dave Chinner wrote: > Finally: none of the patches in your tree have reviewed-by tags. > That says to me that none of this code has been reviewed yet. > Reviewed-by tags are non-negotiable requirement for anything going > through my trees. I don't have

[PATCH v4 10/12] dax: add struct iomap based DAX PMD support

2016-09-29 Thread Ross Zwisler
insert the 2MiB entry. We can solve this problem if we need to, but I think that the cases where both 2MiB entries and 4K entries are being used for the same range will be rare enough and the gain small enough that it probably won't be worth the complexity. Signed-off-by: Ross Zwisler <

[PATCH v4 09/12] dax: correct dax iomap code namespace

2016-09-29 Thread Ross Zwisler
them to dax_iomap_rw(), dax_iomap_fault() and dax_iomap_actor() respectively. Signed-off-by: Ross Zwisler <ross.zwis...@linux.intel.com> Suggested-by: Dave Chinner <da...@fromorbit.com> --- fs/dax.c| 16 fs/ext2/file.c | 6 +++--- fs/xfs/xfs_file.c |

[PATCH v4 07/12] dax: coordinate locking for offsets in PMD range

2016-09-29 Thread Ross Zwisler
. To accomplish this, for ranges covered by a PMD entry we will instead lock based on the page offset of the beginning of the PMD entry. The 'mapping' pointer is still used in the same way. Signed-off-by: Ross Zwisler <ross.zwis...@linux.intel.com> --- fs/dax.c

[PATCH v4 03/12] dax: remove buffer_size_valid()

2016-09-29 Thread Ross Zwisler
Now that ext4 properly sets bh.b_size when we call get_block() for a hole, rely on that value and remove the buffer_size_valid() sanity check. Signed-off-by: Ross Zwisler <ross.zwis...@linux.intel.com> Reviewed-by: Jan Kara <j...@suse.cz> --- fs/dax.c | 22 +- 1

<    2   3   4   5   6   7   8   >