Re: [PATCH v3 00/11] re-enable DAX PMD support

2016-09-29 Thread Ross Zwisler
On Wed, Sep 28, 2016 at 02:55:50PM +1000, Dave Chinner wrote: > On Tue, Sep 27, 2016 at 07:08:42PM -0700, Christoph Hellwig wrote: > > On Tue, Sep 27, 2016 at 02:47:51PM -0600, Ross Zwisler wrote: > > > DAX PMDs have been disabled since Jan Kara introduced DAX radix tree b

Re: [PATCH v3 04/11] ext2: remove support for DAX PMD faults

2016-09-28 Thread Ross Zwisler
On Wed, Sep 28, 2016 at 07:47:20AM +1000, Dave Chinner wrote: > On Tue, Sep 27, 2016 at 02:47:55PM -0600, Ross Zwisler wrote: > > DAX PMD support was added via the following commit: > > > > commit e7b1ea2ad658 ("ext2: huge page fault support") > > > >

[PATCH v3 11/11] dax: remove "depends on BROKEN" from FS_DAX_PMD

2016-09-27 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 v3 01/11] ext4: allow DAX writeback for hole punch

2016-09-27 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 v3 10/11] xfs: use struct iomap based DAX PMD fault path

2016-09-27 Thread Ross Zwisler
Switch xfs_filemap_pmd_fault() from using dax_pmd_fault() to the new and improved iomap_dax_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> --- fs/xfs/xfs_aops.c | 25 +--

[PATCH v3 07/11] dax: coordinate locking for offsets in PMD range

2016-09-27 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 v3 04/11] ext2: remove support for DAX PMD faults

2016-09-27 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 v3 03/11] dax: remove buffer_size_valid()

2016-09-27 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

[PATCH v3 05/11] dax: make 'wait_table' global variable static

2016-09-27 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 v3 09/11] dax: add struct iomap based DAX PMD support

2016-09-27 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 06/10] dax: provide an iomap based fault handler

2016-09-23 Thread Ross Zwisler
On Wed, Sep 14, 2016 at 09:06:33AM +0200, Christoph Hellwig wrote: > On Tue, Sep 13, 2016 at 09:51:26AM -0600, Ross Zwisler wrote: > > I'm working on this right now. I expect that most/all of the infrastructure > > between the bh+get_block_t version and the iomap version to b

Re: [PATCH v2 1/9] ext4: allow DAX writeback for hole punch

2016-09-21 Thread Ross Zwisler
On Tue, Aug 23, 2016 at 04:04:11PM -0600, Ross Zwisler wrote: > 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 r

Re: [PATCH v2 2/9] ext2: tell DAX the size of allocation holes

2016-09-15 Thread Ross Zwisler
On Tue, Aug 23, 2016 at 04:04:12PM -0600, Ross Zwisler wrote: > When DAX calls ext2_get_block() and the file offset points to a hole we > currently don't set bh_result->b_size. When we re-enable PMD faults DAX > will need bh_result->b_size to tell it the size of the hole so

Re: [PATCH 12/12] ext2: use iomap to implement DAX

2016-09-14 Thread Ross Zwisler
file.c:45: undefined reference to `iomap_dax_rw' Makefile:949: recipe for target 'vmlinux' failed make: *** [vmlinux] Error 1 With the following patch squashed into this commit: Reviewed-by: Ross Zwisler <ross.zwis...@linux.intel.com> --- >From 9c084641049990339b40bfd52a0aebf300d896ea M

Re: [PATCH 10/12] xfs: use iomap to implement DAX

2016-09-14 Thread Ross Zwisler
; + error = xfs_setfilesize(ip, pos, count); I think this should be xfs_setfilesize(ip, pos, ret)? 'count' and 'ret' are the same in non-error cases, but in error cases where iomap_dax_rw() does some work and then encounters an error, 'ret' could be smaller. In error cases like this u

Re: [PATCH 06/12] dax: provide an iomap based fault handler

2016-09-14 Thread Ross Zwisler
gt;vm_mm, PGMAJFAULT); > + major = VM_FAULT_MAJOR; > + } > + error = dax_insert_mapping(mapping, iomap.bdev, sector, > + PAGE_SIZE, , vma, vmf); > + break; > + case

Re: [PATCH 05/12] dax: provide an iomap based dax read/write path

2016-09-14 Thread Ross Zwisler
dio_count or the > end_io handler, but instead leaves locking and filesystem-specific I/O > completion to the caller. > > Signed-off-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Ross Zwisler <ross.zwis...@linux.intel.com> ___ Linux

Re: [PATCH 06/10] dax: provide an iomap based fault handler

2016-09-14 Thread Ross Zwisler
On Wed, Sep 14, 2016 at 09:19:10AM +0200, Christoph Hellwig wrote: > On Tue, Sep 13, 2016 at 05:10:39PM -0600, Ross Zwisler wrote: > > If you stick a space in front of the labels (as is done in the rest of > > dax.c) > > it prevents future patches from using them at t

Re: [PATCH 09/10] xfs: refactor xfs_setfilesize

2016-09-13 Thread Ross Zwisler
On Fri, Sep 09, 2016 at 06:34:43PM +0200, Christoph Hellwig wrote: > Rename the current function to __xfs_setfilesize and add a non-static > wrapper that also takes care of creating the transaction. This new > helper will be used by the new iomap-based DAX path. > > Signed-off-by: Christoph

Re: [PATCH 05/10] dax: provide an iomap based dax read/write path

2016-09-13 Thread Ross Zwisler
On Fri, Sep 09, 2016 at 06:34:39PM +0200, Christoph Hellwig wrote: > This is a much simpler implementation of the DAX read/write path that makes > use of the iomap infrastructure. It does not try to mirror the direct I/O > calling conventions and thus doesn't have to deal with i_dio_count or the

Re: [PATCH 04/10] dax: don't pass buffer_head to copy_user_dax

2016-09-13 Thread Ross Zwisler
On Fri, Sep 09, 2016 at 06:34:38PM +0200, Christoph Hellwig wrote: > This way we can use this helper for the iomap based DAX implementation > as well. > > Signed-off-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Ross Zwisler <ross.zwis...@linux.intel.com>

Re: [PATCH 03/10] dax: don't pass buffer_head to dax_insert_mapping

2016-09-13 Thread Ross Zwisler
On Fri, Sep 09, 2016 at 06:34:37PM +0200, Christoph Hellwig wrote: > This way we can use this helper for the iomap based DAX implementation > as well. > > Signed-off-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Ross Zwisler <ross.zwis...@linux.intel.com>

Re: [PATCH 01/10] iomap: add IOMAP_F_NEW flag

2016-09-13 Thread Ross Zwisler
On Fri, Sep 09, 2016 at 06:34:35PM +0200, Christoph Hellwig wrote: > Signed-off-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Ross Zwisler <ross.zwis...@linux.intel.com> Though I guess I've never seen a patch with a completely empty changelog before? :) Maybe it's okay

Re: [PATCH 06/10] dax: provide an iomap based fault handler

2016-09-13 Thread Ross Zwisler
On Sat, Sep 10, 2016 at 09:36:46AM +0200, Christoph Hellwig wrote: > On Sat, Sep 10, 2016 at 08:55:57AM +1000, Dave Chinner wrote: > > THe errors from the above two cases are not acted on. they are > > immediately overwritten by: > > Yes, Robert also pointed this out. Fix below. > > > Is there

Re: Panic when insmod nfit_test.ko

2016-09-13 Thread Ross Zwisler
On Tue, Sep 13, 2016 at 06:38:02AM -0700, Dan Williams wrote: > On Mon, Sep 12, 2016 at 11:01 PM, ryan chen wrote: > > On Tue, Sep 13, 2016 at 10:50 AM, Dan Williams > > wrote: > >> On Mon, Sep 12, 2016 at 7:30 PM, ryan chen

Re: [PATCH v2 2/9] ext2: tell DAX the size of allocation holes

2016-09-11 Thread Ross Zwisler
On Sun, Sep 11, 2016 at 05:47:41AM -0700, Christoph Hellwig wrote: > On Sat, Sep 10, 2016 at 07:52:53AM +, Matthew Wilcox wrote: > > DAX code over to using iomap requires converting all of ext2 away from > > buffer_head; are you saying he's wrong? > > Not sure if he's really saying that, but

[PATCH] /dev/dax: fix Kconfig dependency build breakage

2016-09-09 Thread Ross Zwisler
to `__nd_driver_register' Fix this by making CONFIG_DEV_DAX_PMEM explicitly depend on CONFIG_LIBNVDIMM. This prevents dax_devs.c from being built as a built-in while its dependencies are in the libnvdimm.ko module. Signed-off-by: Ross Zwisler <ross.zwis...@linux.intel.com> --- drivers/dax/Kconf

Re: DAX can not work on virtual nvdimm device

2016-09-08 Thread Ross Zwisler
On Tue, Sep 06, 2016 at 05:06:20PM +0200, Jan Kara wrote: > On Thu 01-09-16 20:57:38, Ross Zwisler wrote: > > On Wed, Aug 31, 2016 at 04:44:47PM +0800, Xiao Guangrong wrote: > > > On 08/31/2016 01:09 AM, Dan Williams wrote: > > > > > > > > Can you post

Re: DAX can not work on virtual nvdimm device

2016-09-01 Thread Ross Zwisler
On Wed, Aug 31, 2016 at 04:44:47PM +0800, Xiao Guangrong wrote: > On 08/31/2016 01:09 AM, Dan Williams wrote: > > > > Can you post your exact reproduction steps? This test is not failing for > > me. > > > > Sure. > > 1. make the guest kernel based on your tree, the top commit is >

Re: [PATCH v2 0/9] re-enable DAX PMD support

2016-08-31 Thread Ross Zwisler
On Wed, Aug 31, 2016 at 08:20:48PM +, Kani, Toshimitsu wrote: > On Tue, 2016-08-30 at 17:01 -0600, Ross Zwisler wrote: > > On Tue, Aug 23, 2016 at 04:04:10PM -0600, Ross Zwisler wrote: > > > > > > DAX PMDs have been disabled since Jan Kara introduced DAX rad

Re: DAX can not work on virtual nvdimm device

2016-08-31 Thread Ross Zwisler
On Wed, Aug 31, 2016 at 04:44:47PM +0800, Xiao Guangrong wrote: > On 08/31/2016 01:09 AM, Dan Williams wrote: > > > > Can you post your exact reproduction steps? This test is not failing for > > me. > > > > Sure. > > 1. make the guest kernel based on your tree, the top commit is >

Re: [PATCH v2 2/9] ext2: tell DAX the size of allocation holes

2016-08-26 Thread Ross Zwisler
On Thu, Aug 25, 2016 at 12:57:28AM -0700, Christoph Hellwig wrote: > Hi Ross, > > can you take at my (fully working, but not fully cleaned up) version > of the iomap based DAX code here: > > http://git.infradead.org/users/hch/vfs.git/shortlog/refs/heads/iomap-dax > > By using iomap we don't

Re: [PATCH v2 2/9] ext2: tell DAX the size of allocation holes

2016-08-25 Thread Ross Zwisler
On Thu, Aug 25, 2016 at 12:57:28AM -0700, Christoph Hellwig wrote: > Hi Ross, > > can you take at my (fully working, but not fully cleaned up) version > of the iomap based DAX code here: > > http://git.infradead.org/users/hch/vfs.git/shortlog/refs/heads/iomap-dax > > By using iomap we don't

[PATCH v2 RESEND] mm: silently skip readahead for DAX inodes

2016-08-25 Thread Ross Zwisler
ork. Signed-off-by: Ross Zwisler <ross.zwis...@linux.intel.com> Reported-by: Jeff Moyer <jmo...@redhat.com> Cc: <sta...@vger.kernel.org>[4.5+] --- Changes from v1: - Added a comment so readers don't have to go putzing around in the git tree to understand why we're d

[PATCH v2] mm: silently skip readahead for DAX inodes

2016-08-24 Thread Ross Zwisler
ork. Signed-off-by: Ross Zwisler <ross.zwis...@linux.intel.com> Reported-by: Jeff Moyer <jmo...@redhat.com> --- Changes from v1: - Added a comment so readers don't have to go putzing around in the git tree to understand why we're doing what we're doing. :) (akpm) --- mm/

[PATCH v2 9/9] dax: remove "depends on BROKEN" from FS_DAX_PMD

2016-08-23 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 v2 8/9] dax: re-enable DAX PMD support

2016-08-23 Thread Ross Zwisler
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 <ross.zwis...@linux.intel.com> --- fs/dax.c

[PATCH v2 7/9] dax: coordinate locking for offsets in PMD range

2016-08-23 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 v2 2/9] ext2: tell DAX the size of allocation holes

2016-08-23 Thread Ross Zwisler
ed-off-by: Ross Zwisler <ross.zwis...@linux.intel.com> --- fs/ext2/inode.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/ext2/inode.c b/fs/ext2/inode.c index d5c7d09..dd55d74 100644 --- a/fs/ext2/inode.c +++ b/fs/ext2/inode.c @@ -773,6 +773,9 @@ int ext2_get_block(struct inode *ino

Re: DAX can not work on virtual nvdimm device

2016-08-19 Thread Ross Zwisler
On Fri, Aug 19, 2016 at 07:59:29AM -0700, Dan Williams wrote: > On Fri, Aug 19, 2016 at 4:19 AM, Xiao Guangrong > wrote: > > > > Hi Dan, > > > > Recently, Redhat reported that nvml test suite failed on QEMU/KVM, > > more detailed info please refer to: > >

[PATCH] ext4: allow DAX writeback for hole punch

2016-08-17 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 v2 2/3] radix-tree tests: add iteration test

2016-08-15 Thread Ross Zwisler
_tree_next_slot() here: if (flags & RADIX_TREE_ITER_TAGGED) { void *canon = slot; iter->tags >>= 1; if (unlikely(!iter->tags)) return NULL; Signed-off-by: Ross Zwisler <ross.zwis...@linux.intel.com> --- tools/testing/radix-tr

Re: [PATCH 1/3] radix-tree: 'slot' can be NULL in radix_tree_next_slot()

2016-08-10 Thread Ross Zwisler
On Wed, Aug 10, 2016 at 09:29:23AM +0300, Konstantin Khlebnikov wrote: > On Tue, Aug 9, 2016 at 6:27 PM, Ross Zwisler > <ross.zwis...@linux.intel.com> wrote: > > On Mon, Aug 08, 2016 at 10:21:39PM +0300, Konstantin Khlebnikov wrote: > > <> > >> NAK. Thi

Re: [PATCH v2] libnvdimm, nd_blk: mask off reserved status bits

2016-08-08 Thread Ross Zwisler
On Tue, Aug 02, 2016 at 12:26:53PM -0600, Ross Zwisler wrote: > The "NVDIMM Block Window Driver Writer's Guide": > > http://pmem.io/documents/ > http://pmem.io/documents/NVDIMM_DriverWritersGuide-July-2016.pdf > > defines the layout of the block window status

[PATCH 2/3] radix-tree tests: add iteration test

2016-08-08 Thread Ross Zwisler
_tree_next_slot() here: if (flags & RADIX_TREE_ITER_TAGGED) { void *canon = slot; iter->tags >>= 1; if (unlikely(!iter->tags)) return NULL; Signed-off-by: Ross Zwisler <ross.zwis...@linux.intel.com> --- tools/testing/radix-tr

[PATCH 3/3] radix-tree tests: properly initialize mutex

2016-08-08 Thread Ross Zwisler
The pthread_mutex_t in regression1.c wasn't being initialized properly. Signed-off-by: Ross Zwisler <ross.zwis...@linux.intel.com> --- tools/testing/radix-tree/regression1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/radix-tree/regression1.c b

[PATCH 1/3] radix-tree: 'slot' can be NULL in radix_tree_next_slot()

2016-08-08 Thread Ross Zwisler
shmem_wait_for_pins(). radix_tree_iter_next() zeros out iter->tags, so we end up exiting radix_tree_next_slot() here: if (flags & RADIX_TREE_ITER_TAGGED) { void *canon = slot; iter->tags >>= 1; if (unlikely(!iter->tags))

[PATCH v2] libnvdimm, nd_blk: mask off reserved status bits

2016-08-02 Thread Ross Zwisler
bits need to be masked off, and the driver must avoid checking the state of those bits. This change ensures that for hardware implementations that set these reserved bits in the status register, the driver won't incorrectly fail the block I/Os. Signed-off-by: Ross Zwisler <ross.zwis...@li

[PATCH] libnvdimm, nd_blk: mask off reserved status bits

2016-07-29 Thread Ross Zwisler
bits need to be masked off, and the driver must avoid checking the state of those bits. This change ensures that for hardware implementations that set these reserved bits in the status register, the driver won't incorrectly fail the block I/Os. Signed-off-by: Ross Zwisler <ross.zwis...@linux.

[PATCH] block: remove BLK_DEV_DAX config option

2016-07-29 Thread Ross Zwisler
This config option was introduced in this commit: commit 03cdadb04077 ("block: disable block device DAX by default") This change reverts that commit, removing the dead config option. Signed-off-by: Ross Zwisler <ross.zwis...@linux.intel.com> Cc: Dave Hansen <dave.han...@linux.i

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

2016-07-25 Thread Ross Zwisler
On Fri, Jul 22, 2016 at 02:19:40PM +0200, Jan Kara wrote: > Currently PTE gets updated in wp_pfn_shared() after dax_pfn_mkwrite() > has released corresponding radix tree entry lock. When we want to > writeprotect PTE on cache flush, we need PTE modification to happen > under radix tree entry lock

[PATCH] radix-tree: fix comment about "exceptional" bits

2016-07-20 Thread Ross Zwisler
#define RADIX_DAX_ENTRY_LOCK (1 << RADIX_TREE_EXCEPTIONAL_SHIFT) This locking code was also made specific to the DAX code instead of being generally implemented in radix-tree.h. So, fix the comment. Signed-off-by: Ross Zwisler <ross.zwis...@linux.intel.com> --- include/linux/radix-tree.h | 2

[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

[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

<    3   4   5   6   7   8