Re: [Lsf-pc] [LSF/MM TOPIC] Badblocks checking/representation in filesystems

2017-01-23 Thread Jan Kara
On Fri 20-01-17 07:42:09, Dan Williams wrote: > On Fri, Jan 20, 2017 at 1:47 AM, Jan Kara wrote: > > On Thu 19-01-17 14:17:19, Vishal Verma wrote: > >> On 01/18, Jan Kara wrote: > >> > On Tue 17-01-17 15:37:05, Vishal Verma wrote: > >> > 2) PMEM is exposed for DAX aware filesystem. This seems to b

[LTP issues] MAP_LOCKED MS_INVALIDATE, dio rw odd count on DAX

2017-01-23 Thread Xiong Zhou
Hi, LTP tests on DAX show 2 issues. msync03 and diotest4, both xfs and ext4, non-DAX pass DAX fail 1, MAP_LOCKED && msync with MS_INVALIDATE, which should fail. Flag checking code in msync looks ok but missing _LOCK vma falgs for DAX mapped vma ? i guess DAX now does not support that ? T

[ndctl PATCH v2] ndctl, create-namespace: add an 'align' option

2017-01-23 Thread Dan Williams
When memory-mode support was added to the kernel it also included a facility to set the alignment of the namespace. By default it is set to 2M, but 4K and 1G are also valid options. Add this support to the utility. As Dave notes, this is prompted by the desire to add test support for device-dax usi

[PATCH] dax: put back __GFP_IO in the dax fault handler

2017-01-23 Thread Dave Jiang
__GFP_IO got accidentally dropped in the dax fault handler during the vmf parameter conversion. Putting it back. Signed-off-by: Dave Jiang --- fs/dax.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/dax.c b/fs/dax.c index 2e90f7a..20e9db8 100644 --- a/fs/dax.c +++ b/fs/dax.c @@ -133

[PATCH] dax: pgoff in fs DAX trace needs to be corrected

2017-01-23 Thread Dave Jiang
With only vmf being passed in, the pgoff in vmf that is passed in is for the PTE and not the PMD. Fix up so the pgoff is corrected. Signed-off-by: Dave Jiang --- include/trace/events/fs_dax.h |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/trace/events/fs_dax.h b

[PATCH 3/3] dax: Support for transparent PUD pages for device DAX

2017-01-23 Thread Dave Jiang
Adding transparent huge PUD pages support for device DAX by adding a pud_fault handler. Signed-off-by: Dave Jiang --- drivers/dax/dax.c | 48 1 file changed, 48 insertions(+) diff --git a/drivers/dax/dax.c b/drivers/dax/dax.c index 922ec46..b90

[PATCH 1/3] mm,fs,dax: Change ->pmd_fault to ->huge_fault

2017-01-23 Thread Dave Jiang
In preparation for adding the ability to handle PUD pages, convert ->pmd_fault to ->huge_fault. The vm_fault structure is extended to include a union of the different page table pointers that may be needed, and three flag bits are reserved to indicate which type of pointer is in the union. [DJ: F

[PATCH 2/3] mm, x86: Add support for PUD-sized transparent hugepages

2017-01-23 Thread Dave Jiang
From: Matthew Wilcox The current transparent hugepage code only supports PMDs. This patch adds support for transparent use of PUDs with DAX. It does not include support for anonymous pages. x86 support code also added. Most of this patch simply parallels the work that was done for huge PMDs. T

[PATCH 0/3] 1G transparent hugepage support for device dax

2017-01-23 Thread Dave Jiang
The following series implements support for 1G trasparent hugepage on x86 for device dax. The bulk of the code was written by Mathew Wilcox a while back supporting transparent 1G hugepage for fs DAX. I have forward ported the relevant bits to 4.10-rc. The current submission has only the necessary c

[PATCH v2] mm, fs: reduce fault, page_mkwrite, and pfn_mkwrite to take only vmf

2017-01-23 Thread Dave Jiang
->fault(), ->page_mkwrite(), and ->pfn_mkwrite() calls do not need to take a vma and vmf parameter when the vma already resides in vmf. Remove the vma parameter to simplify things. Signed-off-by: Dave Jiang Reviewed-by: Ross Zwisler --- This patch has received a build success notification from

Re: [PATCH] mm, fs: reduce fault, page_mkwrite, and pfn_mkwrite to take only vmf

2017-01-23 Thread Ross Zwisler
On Fri, Jan 20, 2017 at 04:33:08PM -0700, Dave Jiang wrote: > ->fault(), ->page_mkwrite(), and ->pfn_mkwrite() calls do not need to take > a vma and vmf parameter when the vma already resides in vmf. Remove the vma > parameter to simplify things. > > Signed-off-by: Dave Jiang > --- > > This patc

Re: [RFC PATCH v2 0/2] block: fix backing_dev_info lifetime

2017-01-23 Thread Thiago Jung Bauermann
Hello Dan, Am Freitag, 6. Januar 2017, 17:02:51 BRST schrieb Dan Williams: > v1 of these changes [1] was a one line change to bdev_get_queue() to > prevent a shutdown crash when del_gendisk() races the final > __blkdev_put(). > > While it is known at del_gendisk() time that the queue is still ali

Re: [PATCH 00/13] dax, pmem: move cpu cache maintenance to libnvdimm

2017-01-23 Thread Dan Williams
On Mon, Jan 23, 2017 at 10:03 AM, Christoph Hellwig wrote: > On Mon, Jan 23, 2017 at 09:14:04AM -0800, Dan Williams wrote: >> The use case that we have now is distinguishing volatile vs persistent >> memory (brd vs pmem). > > brd is a development tool, so until we have other reasons for this > abs

Re: [PATCH] ndctl: add a BTT check utility

2017-01-23 Thread Jeff Moyer
"Verma, Vishal L" writes: > On Fri, 2017-01-20 at 18:14 -0500, Jeff Moyer wrote: >> How was this tested?  Did you perturb the btt in ways that you expect >> can and can't be fixed?  Can you add tests for that? > > Yes, so for some things I tested by essentially hand editing the > metadata. But f

Re: [PATCH 00/13] dax, pmem: move cpu cache maintenance to libnvdimm

2017-01-23 Thread Christoph Hellwig
On Mon, Jan 23, 2017 at 09:14:04AM -0800, Dan Williams wrote: > The use case that we have now is distinguishing volatile vs persistent > memory (brd vs pmem). brd is a development tool, so until we have other reasons for this abstraction (which I'm pretty sure will show up rather sooner than later

Re: [PATCH] ndctl: add a BTT check utility

2017-01-23 Thread Dan Williams
On Mon, Jan 23, 2017 at 9:42 AM, Ross Zwisler wrote: > On Fri, Jan 20, 2017 at 12:04:46PM -0800, Dan Williams wrote: >> [ adding Jeff ] >> >> Some comments on boilerplate / organization items... >> >> >> On Thu, Jan 19, 2017 at 7:12 PM, Vishal Verma >> wrote: >> > Add the check-namespace command

Re: [PATCH] ndctl: add a BTT check utility

2017-01-23 Thread Ross Zwisler
On Fri, Jan 20, 2017 at 12:04:46PM -0800, Dan Williams wrote: > [ adding Jeff ] > > Some comments on boilerplate / organization items... > > > On Thu, Jan 19, 2017 at 7:12 PM, Vishal Verma > wrote: > > Add the check-namespace command to ndctl. This will check the BTT > > metadata layout for th

Re: [PATCH 00/13] dax, pmem: move cpu cache maintenance to libnvdimm

2017-01-23 Thread Dan Williams
On Mon, Jan 23, 2017 at 8:00 AM, Christoph Hellwig wrote: > On Sun, Jan 22, 2017 at 11:10:04PM -0800, Dan Williams wrote: >> How about we solve the copy_from_user() abuse first before we hijack >> this thread for some future feature that afaics has no patches posted >> yet. > > Solving copy_from_u

Re: [PATCH 00/13] dax, pmem: move cpu cache maintenance to libnvdimm

2017-01-23 Thread Christoph Hellwig
On Sun, Jan 22, 2017 at 09:30:23AM -0800, Dan Williams wrote: > So are you saying we need a way to go from a block_device inode to a > dax_device inode and then look up the dax_operations from there? > > A filesystem, if it so chooses, could mount on top of the dax_device > inode directly? Senten

Re: [PATCH 00/13] dax, pmem: move cpu cache maintenance to libnvdimm

2017-01-23 Thread Christoph Hellwig
On Sun, Jan 22, 2017 at 11:10:04PM -0800, Dan Williams wrote: > How about we solve the copy_from_user() abuse first before we hijack > this thread for some future feature that afaics has no patches posted > yet. Solving copy_from_user abuse first sounds perfectly fine to me. But please do so with

Re: [PATCH 00/13] dax, pmem: move cpu cache maintenance to libnvdimm

2017-01-23 Thread Christoph Hellwig
On Mon, Jan 23, 2017 at 06:37:18AM +, Matthew Wilcox wrote: > Wow, DAX devices look painful and awful. I certainly don't want to be > exposing the memory fronted by my network filesystem to userspace to > access. That just seems like a world of pain and bad experiences. So what is your inter