Re: [PATCH v2 03/17] libnvdimm: introduce devm_nvdimm_memremap(), convert nfit_spa_map() users

2016-07-09 Thread kbuild test robot
Hi, [auto build test ERROR on linux-nvdimm/libnvdimm-for-next] [also build test ERROR on v4.7-rc6 next-20160708] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Dan-Williams/replace-pcommit-with-

Re: [PATCH v2 08/17] libnvdimm: introduce nvdimm_flush() and nvdimm_has_flush()

2016-07-09 Thread Dan Williams
On Sat, Jul 9, 2016 at 9:47 PM, kbuild test robot wrote: > Hi, > > [auto build test ERROR on linux-nvdimm/libnvdimm-for-next] > [also build test ERROR on next-20160708] > [cannot apply to v4.7-rc6] > [if your patch is applied to the wrong git tree, please drop us a note to > help improve the syst

Re: [PATCH v2 08/17] libnvdimm: introduce nvdimm_flush() and nvdimm_has_flush()

2016-07-09 Thread kbuild test robot
Hi, [auto build test ERROR on linux-nvdimm/libnvdimm-for-next] [also build test ERROR on next-20160708] [cannot apply to v4.7-rc6] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Dan-Williams/rep

[PATCH v2 16/17] x86/insn: remove pcommit

2016-07-09 Thread Dan Williams
The pcommit instruction is being deprecated in favor of either ADR (asynchronous DRAM refresh: flush-on-power-fail) at the platform level, or posted-write-queue flush addresses as defined by the ACPI 6.x NFIT (NVDIMM Firmware Interface Table). Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter An

[PATCH v2 17/17] pmem: kill __pmem address space

2016-07-09 Thread Dan Williams
The __pmem address space was meant to annotate codepaths that touch persistent memory and need to coordinate a call to wmb_pmem(). Now that wmb_pmem() is gone, there is little need to keep this annotation. Cc: Christoph Hellwig Cc: Ross Zwisler Signed-off-by: Dan Williams --- Documentation/fi

[PATCH v2 15/17] Revert "KVM: x86: add pcommit support"

2016-07-09 Thread Dan Williams
This reverts commit 8b3e34e46aca9b6d349b331cd9cf71ccbdc91b2e. Given the deprecation of the pcommit instruction, revert its usage as a vm exit source in kvm. Cc: Xiao Guangrong Cc: Paolo Bonzini Cc: Ross Zwisler Signed-off-by: Dan Williams --- arch/x86/include/asm/vmx.h |1 - arch/x8

[PATCH v2 11/17] libnvdimm, pmem: flush posted-write queues on shutdown

2016-07-09 Thread Dan Williams
Commit writes to media on system shutdown or pmem driver unload. Signed-off-by: Dan Williams --- drivers/nvdimm/bus.c | 16 drivers/nvdimm/pmem.c |8 include/linux/nd.h|1 + 3 files changed, 25 insertions(+) diff --git a/drivers/nvdimm/bus.c b/drivers/nv

[PATCH v2 04/17] libnvdimm, nfit: remove nfit_spa_map() infrastructure

2016-07-09 Thread Dan Williams
Now that all shared mappings are handled by devm_nvdimm_memremap() we no longer need nfit_spa_map() nor do we need to trigger a callback to the bus provider at region disable time. Signed-off-by: Dan Williams --- drivers/acpi/nfit.c | 146 -- dri

[PATCH v2 07/17] libnvdimm: keep region data alive over namespace removal

2016-07-09 Thread Dan Williams
nd_region device driver data will be used in the namespace i/o path. Re-order nd_region_remove() to ensure this data stays live across namespace device removal Signed-off-by: Dan Williams --- drivers/nvdimm/region.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers

[PATCH v2 10/17] libnvdimm, pmem: use REQ_FUA, REQ_FLUSH for nvdimm_flush()

2016-07-09 Thread Dan Williams
Given that nvdimm_flush() has higher overhead than wmb_pmem() (pointer chasing through nd_region), and that we otherwise assume a platform has ADR capability when flush hints are not present, move nvdimm_flush() to REQ_FLUSH context. Cc: Ross Zwisler Signed-off-by: Dan Williams --- drivers/nvdi

[PATCH v2 14/17] pmem: kill wmb_pmem()

2016-07-09 Thread Dan Williams
All users have been replaced with flushing in the pmem driver. Cc: Ross Zwisler Signed-off-by: Dan Williams --- arch/x86/include/asm/pmem.h | 36 ++--- include/linux/pmem.h| 47 --- 2 files changed, 6 insertions(+),

[PATCH v2 13/17] libnvdimm, pmem: use nvdimm_flush() for namespace I/O writes

2016-07-09 Thread Dan Williams
nsio_rw_bytes() is used to write info block metadata to the namespace, so it should trigger a flush after every write. Replace wmb_pmem() with nvdimm_flush() in this path. Cc: Ross Zwisler Signed-off-by: Dan Williams --- drivers/nvdimm/claim.c |2 +- 1 file changed, 1 insertion(+), 1 delet

[PATCH v2 12/17] fs/dax: remove wmb_pmem()

2016-07-09 Thread Dan Williams
Flushing posted-write queues is now deferred to REQ_FLUSH context, or otherwise handled by an ADR event at the platform level. Cc: Ross Zwisler Signed-off-by: Dan Williams --- fs/dax.c |7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/fs/dax.c b/fs/dax.c index 761495b

[PATCH v2 09/17] libnvdimm: cycle flush hints

2016-07-09 Thread Dan Williams
When the NFIT provides multiple flush hint addresses per-dimm it is expressing that the platform is capable of processing multiple flush requests in parallel. There is some fixed cost per flush request, let the cost be shared in parallel on multiple cpus. Since there may not be enough flush hint

[PATCH v2 08/17] libnvdimm: introduce nvdimm_flush() and nvdimm_has_flush()

2016-07-09 Thread Dan Williams
nvdimm_flush() is a replacement for the x86 'pcommit' instruction. It is an optional write flushing mechanism that an nvdimm bus can provide for the pmem driver to consume. In the case of the NFIT nvdimm-bus-provider nvdimm_flush() is implemented as a series of flush-hint-address [1] writes to ea

[PATCH v2 06/17] tools/testing/nvdimm: simulate multiple flush hints per-dimm

2016-07-09 Thread Dan Williams
Sample nfit data to test the kernel's handling of the multiple flush-hint case. Signed-off-by: Dan Williams --- tools/testing/nvdimm/test/nfit.c | 55 +++--- 1 file changed, 33 insertions(+), 22 deletions(-) diff --git a/tools/testing/nvdimm/test/nfit.c b/tools

[PATCH v2 05/17] libnvdimm, nfit: move flush hint mapping to region-device driver-data

2016-07-09 Thread Dan Williams
In preparation for triggering flushes of a DIMM's writes-posted-queue (WPQ) via the pmem driver move mapping of flush hint addresses to the region driver. Since this uses devm_nvdimm_memremap() the flush addresses will remain mapped while any region to which the dimm belongs is active. We need to

[PATCH v2 00/17] replace pcommit with ADR or directed flushing

2016-07-09 Thread Dan Williams
Changes since v1 [1]: 1/ Move flush address data from nvdimm_drvdata to nd_region_data (Greg, Toshi) 2/ Add more detail to cover letter and patch descriptions (Linda, Jeff) 3/ Account for s/REQ_FLUSH/REQ_PREFLUSH/ rename pending in -next. 4/ Add a directed flush at pmem ->remove() and ->shut

[PATCH v2 02/17] nfit: don't override return value of nfit_mem_init

2016-07-09 Thread Dan Williams
We were needlessly converting nfit_mem_init() errors to -ENOMEM. Signed-off-by: Dan Williams --- drivers/acpi/nfit.c |5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/acpi/nfit.c b/drivers/acpi/nfit.c index d79837b9d07e..f8c1a850effc 100644 --- a/drivers/acpi/nf

[PATCH v2 03/17] libnvdimm: introduce devm_nvdimm_memremap(), convert nfit_spa_map() users

2016-07-09 Thread Dan Williams
In preparation for generically mapping flush hint addresses for both the BLK and PMEM use case, provide a generic / reference counted mapping api. Given the fact that a dimm may belong to multiple regions (PMEM and BLK), the flush hint addresses need to be held valid as long as any region associat

[PATCH v2 01/17] nfit: always associate flush hints

2016-07-09 Thread Dan Williams
Before enabling use of flush hints for pmem regions, we need to make sure they are always associated. Move the initialization of nfit_flush out of the block-window specific init path to the general init path. Cc: Ross Zwisler Signed-off-by: Dan Williams --- drivers/acpi/nfit.c | 17 -