Questions about vNVDIMM on qemu/KVM

2018-05-22 Thread Yasunori Goto
Hello, I'm investigating status of vNVDIMM on qemu/KVM, and I have some questions about it. I'm glad if anyone answer them. In my understanding, qemu/KVM has a feature to show NFIT for guest, and it will be still updated about platform capability with this patch set.

Re: [PATCH 07/11] mm, madvise_inject_error: fix page count leak

2018-05-22 Thread Naoya Horiguchi
On Tue, May 22, 2018 at 07:40:09AM -0700, Dan Williams wrote: > The madvise_inject_error() routine uses get_user_pages() to lookup the > pfn and other information for injected error, but it fails to release > that pin. > > The dax-dma-vs-truncate warning catches this failure with the following >

RETURNED MAIL: DATA FORMAT ERROR

2018-05-22 Thread Bounced mail
The original message was received at Wed, 23 May 2018 10:59:05 +0800 from lists.01.org [149.215.9.222] - The following addresses had permanent fatal errors - - Transcript of session follows - while talking to lists.01.org.: >>> MAIL From:"Bounced

Re: [dm-devel] [patch 4/4] dm-writecache: use new API for flushing

2018-05-22 Thread Jeff Moyer
Hi, Mike, Mike Snitzer writes: > Looking at Mikulas' wrapper API that you and hch are calling into > question: > > For ARM it is using arch/arm64/mm/flush.c:arch_wb_cache_pmem(). > (And ARM does seem to be providing CONFIG_ARCH_HAS_PMEM_API.) > > Whereas x86_64 is using

Re: [PATCH v4 06/14] PCI/P2PDMA: Add P2P DMA driver writer's documentation

2018-05-22 Thread Logan Gunthorpe
Thanks for the review Randy! I'll make the changes for the next time we post the series. On 22/05/18 03:24 PM, Randy Dunlap wrote: >> +The first task an orchestrator driver must do is compile a list of >> +all client drivers that will be involved in a given transaction. For >> +example, the NVMe

Re: [PATCH v4 06/14] PCI/P2PDMA: Add P2P DMA driver writer's documentation

2018-05-22 Thread Randy Dunlap
On 04/23/2018 04:30 PM, Logan Gunthorpe wrote: > Add a restructured text file describing how to write drivers > with support for P2P DMA transactions. The document describes > how to use the APIs that were added in the previous few > commits. > > Also adds an index for the PCI documentation tree

Re: [patch 4/4] dm-writecache: use new API for flushing

2018-05-22 Thread Mike Snitzer
On Tue, May 22 2018 at 3:27pm -0400, Dan Williams wrote: > On Tue, May 22, 2018 at 12:19 PM, Mike Snitzer wrote: > > On Tue, May 22 2018 at 3:00pm -0400, > > Dan Williams wrote: > > > >> On Tue, May 22, 2018 at 11:41 AM,

Re: [patch 4/4] dm-writecache: use new API for flushing

2018-05-22 Thread Dan Williams
On Tue, May 22, 2018 at 12:19 PM, Mike Snitzer wrote: > On Tue, May 22 2018 at 3:00pm -0400, > Dan Williams wrote: > >> On Tue, May 22, 2018 at 11:41 AM, Mike Snitzer wrote: >> > On Tue, May 22 2018 at 2:39am -0400, >> >

Re: [patch 4/4] dm-writecache: use new API for flushing

2018-05-22 Thread Mike Snitzer
On Tue, May 22 2018 at 3:00pm -0400, Dan Williams wrote: > On Tue, May 22, 2018 at 11:41 AM, Mike Snitzer wrote: > > On Tue, May 22 2018 at 2:39am -0400, > > Christoph Hellwig wrote: > > > >> On Sat, May 19, 2018 at 07:25:07AM

Re: [patch 4/4] dm-writecache: use new API for flushing

2018-05-22 Thread Dan Williams
On Tue, May 22, 2018 at 11:41 AM, Mike Snitzer wrote: > On Tue, May 22 2018 at 2:39am -0400, > Christoph Hellwig wrote: > >> On Sat, May 19, 2018 at 07:25:07AM +0200, Mikulas Patocka wrote: >> > Use new API for flushing persistent memory. >> >> The

Re: [patch 4/4] dm-writecache: use new API for flushing

2018-05-22 Thread Mike Snitzer
On Tue, May 22 2018 at 2:39am -0400, Christoph Hellwig wrote: > On Sat, May 19, 2018 at 07:25:07AM +0200, Mikulas Patocka wrote: > > Use new API for flushing persistent memory. > > The sentence doesnt make much sense. 'A new API', 'A better > abstraction' maybe? > > > >

[ndctl PATCH] test: add a MADV_HWPOISON test

2018-05-22 Thread Dan Williams
Check that injecting soft-poison to a dax mapping results in SIGBUS with the expected BUS_MCEERR_AR siginfo data. Signed-off-by: Dan Williams --- test/dax-pmd.c | 130 ++-- 1 file changed, 126 insertions(+), 4

[ndctl PATCH] ndctl: hide null uuids

2018-05-22 Thread Dan Williams
Clean up the namespace listing to hide the 'raw_uuid' field when it is zero. Signed-off-by: Dan Williams --- util/json.c | 19 +-- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/util/json.c b/util/json.c index

[PATCH 10/11] mm, memory_failure: teach memory_failure() about dev_pagemap pages

2018-05-22 Thread Dan Williams
mce: Uncorrected hardware memory error in user-access at af34214200 {1}[Hardware Error]: It has been corrected by h/w and requires no further action mce: [Hardware Error]: Machine check events logged {1}[Hardware Error]: event severity: corrected Memory failure: 0xaf34214:

[PATCH 07/11] mm, madvise_inject_error: fix page count leak

2018-05-22 Thread Dan Williams
The madvise_inject_error() routine uses get_user_pages() to lookup the pfn and other information for injected error, but it fails to release that pin. The dax-dma-vs-truncate warning catches this failure with the following signature: Injecting memory failure for pfn 0x208900 at process virtual

[PATCH 11/11] libnvdimm, pmem: restore page attributes when clearing errors

2018-05-22 Thread Dan Williams
Use clear_mce_nospec() to restore WB mode for the kernel linear mapping of a pmem page that was marked 'HWPoison'. A page with 'HWPoison' set has also been marked UC in PAT (page attribute table) via set_mce_nospec() to prevent speculative retrievals of poison. The 'HWPoison' flag is only cleared

[PATCH 08/11] x86, memory_failure: introduce {set, clear}_mce_nospec()

2018-05-22 Thread Dan Williams
Currently memory_failure() returns zero if the error was handled. On that result mce_unmap_kpfn() is called to zap the page out of the kernel linear mapping to prevent speculative fetches of potentially poisoned memory. However, in the case of dax mapped devmap pages the page may be in active

[PATCH 06/11] filesystem-dax: perform __dax_invalidate_mapping_entry() under the page lock

2018-05-22 Thread Dan Williams
Hold the page lock while invalidating mapping entries to prevent races between rmap using the address_space and the filesystem freeing the address_space. This is more complicated than the simple description implies because dev_pagemap pages that fsdax uses do not have any concept of page size.

[PATCH 09/11] mm, memory_failure: pass page size to kill_proc()

2018-05-22 Thread Dan Williams
Given that ZONE_DEVICE / dev_pagemap pages are never assembled into compound pages, the size determination logic in kill_proc() needs updating for the dev_pagemap case. In preparation for dev_pagemap support rework memory_failure() and kill_proc() to pass / consume the page size explicitly. Cc:

[PATCH 03/11] device-dax: enable page_mapping()

2018-05-22 Thread Dan Williams
In support of enabling memory_failure() handling for device-dax mappings, set the ->mapping association of pages backing device-dax mappings. The rmap implementation requires page_mapping() to return the address_space hosting the vmas that map the page. The ->mapping pointer is never cleared.

[PATCH 05/11] filesystem-dax: set page->index

2018-05-22 Thread Dan Williams
In support of enabling memory_failure() handling for filesystem-dax mappings, set ->index to the pgoff of the page. The rmap implementation requires ->index to bound the search through the vma interval tree. The index is set and cleared at dax_associate_entry() and dax_disassociate_entry() time

[PATCH 04/11] device-dax: set page->index

2018-05-22 Thread Dan Williams
In support of enabling memory_failure() handling for device-dax mappings, set ->index to the pgoff of the page. The rmap implementation requires ->index to bound the search through the vma interval tree. The ->index value is never cleared. There is no possibility for the page to become associated

[PATCH 02/11] device-dax: cleanup vm_fault de-reference chains

2018-05-22 Thread Dan Williams
Define a local 'vma' variable rather than repetitively de-referencing the passed in 'struct vm_fault *' instance. Signed-off-by: Dan Williams --- drivers/dax/device.c | 30 -- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git

[PATCH 01/11] device-dax: convert to vmf_insert_mixed and vm_fault_t

2018-05-22 Thread Dan Williams
Use new return type vm_fault_t for fault and huge_fault handler. For now, this is just documenting that the function returns a VM_FAULT value rather than an errno. Once all instances are converted, vm_fault_t will become a distinct type. Commit 1c8f422059ae ("mm: change return type to

[PATCH 00/11] mm: Teach memory_failure() about ZONE_DEVICE pages

2018-05-22 Thread Dan Williams
As it stands, memory_failure() gets thoroughly confused by dev_pagemap backed mappings. The recovery code has specific enabling for several possible page states and needs new enabling to handle poison in dax mappings. In order to support reliable reverse mapping of user space addresses add new

Re: [dm-devel] [patch 4/4] dm-writecache: use new API for flushing

2018-05-22 Thread Christoph Hellwig
On Sat, May 19, 2018 at 07:25:07AM +0200, Mikulas Patocka wrote: > Use new API for flushing persistent memory. The sentence doesnt make much sense. 'A new API', 'A better abstraction' maybe? > > The problem is this: > * on X86-64, non-temporal stores have the best performance > * ARM64 doesn't

Re: [PATCH v10] mm: introduce MEMORY_DEVICE_FS_DAX and CONFIG_DEV_PAGEMAP_OPS

2018-05-22 Thread Christoph Hellwig
On Mon, May 21, 2018 at 11:04:10AM +0200, Jan Kara wrote: > We definitely do have customers using "execute in place" on s390x from > dcssblk. I've got about two bug reports for it when customers were updating > from old kernels using original XIP to kernels using DAX. So we need to > keep that

Re: [PATCH v11 7/7] xfs, dax: introduce xfs_break_dax_layouts()

2018-05-22 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig ___ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm

Re: [PATCH v11 2/7] mm: introduce MEMORY_DEVICE_FS_DAX and CONFIG_DEV_PAGEMAP_OPS

2018-05-22 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig ___ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm

Re: [PATCH v11 1/7] memremap: split devm_memremap_pages() and memremap() infrastructure

2018-05-22 Thread Christoph Hellwig
Looks good: Reviewed-by: Christoph Hellwig ___ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm