Add support for flush hints and use them in the nd_blk I/O path instead
of the global persistent_sync() whenever we can.
Signed-off-by: Ross Zwisler ross.zwis...@linux.intel.com
Cc: Dan Williams dan.j.willi...@intel.com
Cc: Rafael J. Wysocki r...@rjwysocki.net
Cc: linux-nvd...@lists.01.org
Cc
Update the PMEM and ND_BLK I/O paths to use the new PMEM API and to
adhere to the read/write flows outlined in the NVDIMM Block Window
Driver Writer's Guide:
http://pmem.io/documents/NVDIMM_Driver_Writers_Guide.pdf
Signed-off-by: Ross Zwisler ross.zwis...@linux.intel.com
Cc: Dan Williams
Add support in the ND_BLK I/O path for the latch and flush flags
defined in the Get Block NVDIMM Flags _DSM function:
http://pmem.io/documents/NVDIMM_DSM_Interface_Example.pdf
Signed-off-by: Ross Zwisler ross.zwis...@linux.intel.com
Cc: Dan Williams dan.j.willi...@intel.com
Cc: Rafael J. Wysocki
casting the pointers received from
ioremap_nocache() and given to iounmap() gives us the correct behavior
and makes sparse happy.
Signed-off-by: Ross Zwisler ross.zwis...@linux.intel.com
Cc: Dan Williams dan.j.willi...@intel.com
Cc: linux-nvd...@lists.01.org
---
drivers/block/nd/pmem.c | 7 ---
1
for ioremapping and deinterleaving. mmio-base still
has the __iomem annotation and is used via readq() and writeq() for the
control and status registers. mmio-aperture is used via normal
memcpy() for aperture I/O.
Signed-off-by: Ross Zwisler ross.zwis...@linux.intel.com
Cc: Dan Williams dan.j.willi
/kernel/git/djbw/nvdimm.git/log/?h=libnd-for-next
One last note - I'm going to be unavailable soon, so patch feedback will most
likely be handled by Dan Williams. Thanks, Dan. :)
Ross Zwisler (6):
pmem: add force casts to avoid __iomem annotation
nfit: Fix up address spaces, sparse warnings
x86
On Thu, 2015-05-28 at 16:20 -0700, H. Peter Anvin wrote:
On 05/28/2015 03:35 PM, Ross Zwisler wrote:
Add a new PMEM API to x86, and allow for architectures that do not
implement this API. Architectures that implement the PMEM API
should
define ARCH_HAS_PMEM_API in their kernel
On Thu, 2015-05-28 at 21:19 -0700, H. Peter Anvin wrote:
On 05/28/2015 05:02 PM, Dan Williams wrote:
Hmm, yes, but I believe Ross (on vacation now) was following the
precedent set by commit cd8ddf1a2800 x86: clflush_page_range needs
mfence whereby the api handles all necessary fencing
On Thu, 2015-05-28 at 15:47 -0700, Dan Williams wrote:
On Thu, May 28, 2015 at 3:35 PM, Ross Zwisler
ross.zwis...@linux.intel.com wrote:
Even though we use ioremap_nocache() to map our persistent memory
in the
pmem driver, the memory we are mapping behaves like normal memory
On Mon, 2015-08-17 at 21:10 +0200, Christoph Hellwig wrote:
#include linux/uaccess.h
+#include linux/uio.h
+
Can we keep this in linux/pmem.h? I'm pretty sure the stubs would need
it as well, and even if they don't it'll keep the includes consistent.
Sure.
+{
+ size_t len;
+
Update the annotation for the kaddr pointer returned by direct_access()
so that it is a __pmem pointer. This is consistent with the PMEM driver
and with how this direct_access() pointer is used in the DAX code.
Signed-off-by: Ross Zwisler ross.zwis...@linux.intel.com
Reviewed-by: Christoph
Make rd_size static because it is local to drivers/block/brd.c
This was reported by sparse:
drivers/block/brd.c:445:5: warning: symbol 'rd_size' was not declared.
Should it be static?
Signed-off-by: Ross Zwisler ross.zwis...@linux.intel.com
Reviewed-by: Christoph Hellwig h...@lst.de
and are implemented in such a way that the wmb_pmem()
will make the stores to PMEM durable. Because both APIs are unordered
they can be called as needed without introducing any unwanted memory
barriers.
Signed-off-by: Ross Zwisler ross.zwis...@linux.intel.com
---
arch/x86/include/asm/pmem.h | 75
and added a TODO to move to
non-temporal stores (Christoph)
Ross Zwisler (7):
brd: make rd_size static
pmem, x86: move x86 PMEM API to new pmem.h header
pmem: remove layer when calling arch_has_wmb_pmem()
pmem, x86: clean up conditional pmem includes
pmem: add copy_from_iter_pmem
Update the DAX I/O path so that all operations that store data (I/O
writes, zeroing blocks, punching holes, etc.) properly synchronize the
stores to media using the PMEM API. This ensures that the data DAX is
writing is durable on media before the operation completes.
Signed-off-by: Ross Zwisler
Move the x86 PMEM API implementation out of asm/cacheflush.h and into
its own header asm/pmem.h. This will allow members of the PMEM API to
be more easily identified on this and other architectures.
Signed-off-by: Ross Zwisler ross.zwis...@linux.intel.com
Suggested-by: Christoph Hellwig h
and the redundant CONFIG_ARCH_HAS_PMEM_API
check. Rename __arch_has_wmb_pmem() to arch_has_wmb_pmem() since we no
longer have a wrapper, and just have arch_has_pmem_api() call the
architecture specific arch_has_wmb_pmem() directly.
Signed-off-by: Ross Zwisler ross.zwis...@linux.intel.com
Reviewed
with the inline defaults in linux/pmem.h and gave compile errors.
Signed-off-by: Ross Zwisler ross.zwis...@linux.intel.com
Reviewed-by: Christoph Hellwig h...@lst.de
---
arch/x86/include/asm/pmem.h | 13 ++---
1 file changed, 2 insertions(+), 11 deletions(-)
diff --git a/arch/x86/include/asm/pmem.h
with the inline defaults in linux/pmem.h and gave compile errors.
Signed-off-by: Ross Zwisler ross.zwis...@linux.intel.com
Reviewed-by: Christoph Hellwig h...@lst.de
---
arch/x86/include/asm/pmem.h | 13 ++---
1 file changed, 2 insertions(+), 11 deletions(-)
diff --git a/arch/x86/include/asm/pmem.h
Update the annotation for the kaddr pointer returned by direct_access()
so that it is a __pmem pointer. This is consistent with the PMEM driver
and with how this direct_access() pointer is used in the DAX code.
Signed-off-by: Ross Zwisler ross.zwis...@linux.intel.com
Reviewed-by: Christoph
and the redundant CONFIG_ARCH_HAS_PMEM_API
check. Rename __arch_has_wmb_pmem() to arch_has_wmb_pmem() since we no
longer have a wrapper, and just have arch_has_pmem_api() call the
architecture specific arch_has_wmb_pmem() directly.
Signed-off-by: Ross Zwisler ross.zwis...@linux.intel.com
Reviewed
and are implemented in such a way that the wmb_pmem()
will make the stores to PMEM durable. Because both APIs are unordered
they can be called as needed without introducing any unwanted memory
barriers.
Signed-off-by: Ross Zwisler ross.zwis...@linux.intel.com
---
arch/x86/include/asm/pmem.h | 75
Move the x86 PMEM API implementation out of asm/cacheflush.h and into
its own header asm/pmem.h. This will allow members of the PMEM API to
be more easily identified on this and other architectures.
Signed-off-by: Ross Zwisler ross.zwis...@linux.intel.com
Suggested-by: Christoph Hellwig h
Make rd_size static because it is local to drivers/block/brd.c
This was reported by sparse:
drivers/block/brd.c:445:5: warning: symbol 'rd_size' was not declared.
Should it be static?
Signed-off-by: Ross Zwisler ross.zwis...@linux.intel.com
Reviewed-by: Christoph Hellwig h...@lst.de
.
Signed-off-by: Ross Zwisler ross.zwis...@linux.intel.com
Cc: Dan Williams dan.j.willi...@intel.com
---
arch/x86/Kconfig | 1 +
arch/x86/include/asm/cacheflush.h | 2 ++
arch/x86/include/asm/io.h | 2 --
arch/x86/include/asm/pmem.h | 2 ++
drivers/acpi/Kconfig
On Mon, Aug 24, 2015 at 01:02:17PM -0400, Jeff Moyer wrote:
Ross Zwisler ross.zwis...@linux.intel.com writes:
Only read 32 bits for the BLK status register in read_blk_stat().
The format and size of this register is defined in the
NVDIMM Driver Writer's guide:
http://pmem.io
On Thu, 2015-08-20 at 11:26 -0700, Dan Williams wrote:
On Thu, Aug 20, 2015 at 11:17 AM, Ross Zwisler
ross.zwis...@linux.intel.com wrote:
On Thu, 2015-08-20 at 10:59 -0700, Dan Williams wrote:
[..]
Ah, I think we're getting confused about the deinterleave part.
The aperture is a set
range.
Reviewed-by: Ross Zwisler ross.zwis...@linux.intel.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org
On Thu, 2015-08-20 at 10:59 -0700, Dan Williams wrote:
On Thu, Aug 20, 2015 at 9:44 AM, Ross Zwisler
ross.zwis...@linux.intel.com wrote:
On Wed, 2015-08-19 at 16:06 -0700, Dan Williams wrote:
On Wed, Aug 19, 2015 at 3:48 PM, Ross Zwisler
ross.zwis...@linux.intel.com wrote:
Add support
);
mem_cgroup_count_vm_event(vma-vm_mm, PGMAJFAULT);
result |= VM_FAULT_MAJOR;
Ross Zwisler (7):
brd: make rd_size static
pmem, x86: move x86 PMEM API to new pmem.h header
pmem: remove layer when calling arch_has_wmb_pmem()
pmem, x86: clean up conditional pmem includes
pmem: add
Update the DAX I/O path so that all operations that store data (I/O
writes, zeroing blocks, punching holes, etc.) properly synchronize the
stores to media using the PMEM API. This ensures that the data DAX is
writing is durable on media before the operation completes.
Signed-off-by: Ross Zwisler
completes.
Patches 1-4 are a few random cleanups.
Changes from v2:
- Introduce copy_from_iter_pmem() as part of the PMEM API. Keep the use of
__arch_wmb_cache_pmem() internal to the implmentation of the PMEM API. (Dan)
Ross Zwisler (7):
brd: make rd_size static
pmem, x86: move x86 PMEM API to new
Make rd_size static because it is local to drivers/block/brd.c
This was reported by sparse:
drivers/block/brd.c:445:5: warning: symbol 'rd_size' was not declared.
Should it be static?
Signed-off-by: Ross Zwisler ross.zwis...@linux.intel.com
---
drivers/block/brd.c | 2 +-
1 file changed, 1
with the inline defaults in linux/pmem.h and gave compile errors.
Signed-off-by: Ross Zwisler ross.zwis...@linux.intel.com
---
arch/x86/include/asm/pmem.h | 13 ++---
1 file changed, 2 insertions(+), 11 deletions(-)
diff --git a/arch/x86/include/asm/pmem.h b/arch/x86/include/asm/pmem.h
index 1e8dbb7
and are implemented in such a way that the wmb_pmem()
will make the stores to PMEM durable. Because both APIs are unordered
they can be called as needed without introducing any unwanted memory
barriers.
Signed-off-by: Ross Zwisler ross.zwis...@linux.intel.com
---
arch/x86/include/asm/pmem.h | 69
and the redundant CONFIG_ARCH_HAS_PMEM_API
check. Rename __arch_has_wmb_pmem() to arch_has_wmb_pmem() since we no
longer have a wrapper, and just have arch_has_pmem_api() call the
architecture specific arch_has_wmb_pmem() directly.
Signed-off-by: Ross Zwisler ross.zwis...@linux.intel.com
Reviewed
Update the annotation for the kaddr pointer returned by direct_access()
so that it is a __pmem pointer. This is consistent with the PMEM driver
and with how this direct_access() pointer is used in the DAX code.
Signed-off-by: Ross Zwisler ross.zwis...@linux.intel.com
---
Documentation
Update the DAX I/O path so that all operations that store data (I/O
writes, zeroing blocks, punching holes, etc.) properly synchronize the
stores to media using the PMEM API. This ensures that the data DAX is
writing is durable on media before the operation completes.
Signed-off-by: Ross Zwisler
Move the x86 PMEM API implementation out of asm/cacheflush.h and into
its own header asm/pmem.h. This will allow members of the PMEM API to
be more easily identified on this and other architectures.
Signed-off-by: Ross Zwisler ross.zwis...@linux.intel.com
Suggested-by: Christoph Hellwig h
On Sat, 2015-08-15 at 08:44 -0700, Dan Williams wrote:
On Sat, Aug 15, 2015 at 2:19 AM, Christoph Hellwig h...@lst.de wrote:
On Thu, Aug 13, 2015 at 10:51:11AM -0600, Ross Zwisler wrote:
Update the annotation for the kaddr pointer returned by direct_access()
so that it is a __pmem pointer
On Thu, 2015-08-20 at 13:27 -0700, Dan Williams wrote:
[...]
With regards to the fencing, since we already take care to flush
writes we don't need to fence at all for the flush, right? All we
care about is that reads see valid data.
We were careful to flush writes, but we could still have
On Wed, 2015-08-19 at 16:06 -0700, Dan Williams wrote:
On Wed, Aug 19, 2015 at 3:48 PM, Ross Zwisler
ross.zwis...@linux.intel.com wrote:
Add support for the read flush _DSM flag, as outlined in the DSM spec:
http://pmem.io/documents/NVDIMM_DSM_Interface_Example.pdf
This flag tells
On Thu, 2015-08-20 at 11:21 +0100, Will Deacon wrote:
On Wed, Aug 19, 2015 at 11:48:04PM +0100, Ross Zwisler wrote:
Add support for the read flush _DSM flag, as outlined in the DSM spec:
http://pmem.io/documents/NVDIMM_DSM_Interface_Example.pdf
This flag tells the ND BLK driver
Only read 32 bits for the BLK status register in read_blk_stat().
The format and size of this register is defined in the
NVDIMM Driver Writer's guide:
http://pmem.io/documents/NVDIMM_Driver_Writers_Guide.pdf
Signed-off-by: Ross Zwisler ross.zwis...@linux.intel.com
Reported-by: Nicholas Moulin
On Fri, 2015-07-24 at 22:39 -0400, Dan Williams wrote:
In preparation for deprecating ioremap_cache() convert its usage in
libnvdimm and the PMEM API to memremap.
Signed-off-by: Dan Williams dan.j.willi...@intel.com
---
arch/x86/include/asm/io.h |7 +--
On Fri, 2015-07-24 at 22:40 -0400, Dan Williams wrote:
In preparation for deprecating ioremap_wt() convert its usage in
the PMEM API to memremap.
Cc: Ross Zwisler ross.zwis...@linux.intel.com
Signed-off-by: Dan Williams dan.j.willi...@intel.com
Acked-by: Ross Zwisler ross.zwis
an arch has a need for different mapping types by
address range. For example the ACPI NFIT carries EFI mapping types in
its memory range description table.
Cc: Ross Zwisler ross.zwis...@linux.intel.com
Signed-off-by: Dan Williams dan.j.willi...@intel.com
---
arch/x86/include/asm/io.h
On Mon, 2015-08-03 at 11:01 -0700, Dan Williams wrote:
On Mon, Aug 3, 2015 at 10:21 AM, Ross Zwisler
ross.zwis...@linux.intel.com wrote:
On Thu, 2015-07-30 at 12:55 -0400, Dan Williams wrote:
Update memremap_pmem() to query the architecture for the mapping type of
the given persistent
in DAX to write back stores to persistent memory.
Details on CLWB can be found here:
https://software.intel.com/sites/default/files/managed/0d/53/319433-022.pdf
Signed-off-by: Ross Zwisler ross.zwis...@linux.intel.com
---
arch/x86/include/asm/cacheflush.h | 1 +
arch/x86/mm/pageattr.c
, for example when punching holes of zeros in a DAX file.
It can also be used as a cache invalidate when caller needs to be sure
that the cache lines are completely flushed from the processor cache
hierarchy.
Signed-off-by: Ross Zwisler ross.zwis...@linux.intel.com
---
arch/x86/include/asm/cacheflush.h
types of
sliding MMIO windows. At this point I'm inclined to have it as part of the
PMEM API, and then take on the effort of making it a general cache flusing API
if other users come along.
Ross Zwisler (6):
pmem: remove indirection layer arch_has_pmem_api()
x86: clean up conditional pmem
-by: Ross Zwisler ross.zwis...@linux.intel.com
---
arch/x86/include/asm/cacheflush.h | 13 ++---
1 file changed, 2 insertions(+), 11 deletions(-)
diff --git a/arch/x86/include/asm/cacheflush.h
b/arch/x86/include/asm/cacheflush.h
index 9bf3ea1..ae00766 100644
--- a/arch/x86/include/asm
, and just have arch_has_pmem_api()
call __arch_has_wmb_pmem() directly.
Signed-off-by: Ross Zwisler ross.zwis...@linux.intel.com
---
include/linux/pmem.h | 11 ++-
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/include/linux/pmem.h b/include/linux/pmem.h
index 03f9d73..fb62ce4
Update the DAX I/O path so that all operations that store data (I/O
writes, zeroing blocks, punching holes, etc.) properly synchronize the
stores to media using the PMEM API. This ensures that the data DAX is
writing is durable on media before the operation completes.
Signed-off-by: Ross Zwisler
aperture
mapping from write-combining to write-back via memremap_pmem().
Signed-off-by: Ross Zwisler ross.zwis...@linux.intel.com
---
drivers/acpi/nfit.c | 18 +-
drivers/acpi/nfit.h | 6 +-
2 files changed, 14 insertions(+), 10 deletions(-)
diff --git a/drivers/acpi/nfit.c b
On Thu, 2015-08-06 at 23:38 -0700, Christoph Hellwig wrote:
On Thu, Aug 06, 2015 at 11:43:15AM -0600, Ross Zwisler wrote:
Prior to this change arch_has_wmb_pmem() was only called by
arch_has_pmem_api(). Both arch_has_wmb_pmem() and arch_has_pmem_api()
checked to make sure
On Fri, 2015-08-07 at 09:14 -0700, Dan Williams wrote:
On Thu, Aug 6, 2015 at 10:43 AM, Ross Zwisler
ross.zwis...@linux.intel.com wrote:
Prior to this change arch_has_wmb_pmem() was only called by
arch_has_pmem_api(). Both arch_has_wmb_pmem() and arch_has_pmem_api()
checked to make sure
On Fri, 2015-08-07 at 08:37 -0700, Joe Perches wrote:
On Fri, 2015-08-07 at 09:01 -0600, Ross Zwisler wrote:
When running checkpatch.pl against my latest patch set, I hit what I think
are
two false positives. Here are the related lines:
+static inline void flush_cache_pmem(void
On Fri, 2015-08-07 at 07:04 +1000, Dave Chinner wrote:
On Thu, Aug 06, 2015 at 11:43:20AM -0600, Ross Zwisler wrote:
Update the DAX I/O path so that all operations that store data (I/O
writes, zeroing blocks, punching holes, etc.) properly synchronize the
stores to media using the PMEM API
On Fri, 2015-08-07 at 09:47 -0700, Dan Williams wrote:
On Thu, Aug 6, 2015 at 10:43 AM, Ross Zwisler
ross.zwis...@linux.intel.com wrote:
Patch 5 adds support for the read flush _DSM flag, allowing us to change
the
ND BLK aperture mapping from write-combining to write-back via
On Thu, 2015-08-06 at 23:39 -0700, Christoph Hellwig wrote:
On Thu, Aug 06, 2015 at 11:43:16AM -0600, Ross Zwisler wrote:
Prior to this change x86_64 used the pmem defines in
arch/x86/include/asm/cacheflush.h, and UM used the default ones at the
top of include/linux/pmem.h. The inclusion
of this attribute too.
Signed-off-by: Joe Perches j...@perches.com
Reviewed-by: Ross Zwisler ross.zwis...@linux.intel.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org
the arch implementation of the PMEM API into it's own arch header
(Christoph).
Ross Zwisler (7):
brd: make rd_size static
pmem, x86: move x86 PMEM API to new pmem.h header
pmem: remove layer when calling arch_has_wmb_pmem()
pmem, x86: clean up conditional pmem includes
pmem: add
, or by using non-temporal stores.
Both of these new APIs must be explicitly ordered using a wmb_pmem()
function call. Because both APIs are unordered they can be called as
needed without introducing any unwanted memory barriers.
Signed-off-by: Ross Zwisler ross.zwis...@linux.intel.com
---
arch/x86
with the inline defaults in linux/pmem.h and gave compile errors.
Signed-off-by: Ross Zwisler ross.zwis...@linux.intel.com
---
arch/x86/include/asm/pmem.h | 13 ++---
1 file changed, 2 insertions(+), 11 deletions(-)
diff --git a/arch/x86/include/asm/pmem.h b/arch/x86/include/asm/pmem.h
index 1e8dbb7
and the redundant CONFIG_ARCH_HAS_PMEM_API
check. Rename __arch_has_wmb_pmem() to arch_has_wmb_pmem() since we no
longer have a wrapper, and just have arch_has_pmem_api() call the
architecture specific arch_has_wmb_pmem() directly.
Signed-off-by: Ross Zwisler ross.zwis...@linux.intel.com
Reviewed
Make rd_size static because it is local to drivers/block/brd.c
This was reported by sparse:
drivers/block/brd.c:445:5: warning: symbol 'rd_size' was not declared.
Should it be static?
Signed-off-by: Ross Zwisler ross.zwis...@linux.intel.com
---
drivers/block/brd.c | 2 +-
1 file changed, 1
Update the annotation for the kaddr pointer returned by direct_access()
so that it is a __pmem pointer. This is consistent with the PMEM driver
and with how this direct_access() pointer is used in the DAX code.
Signed-off-by: Ross Zwisler ross.zwis...@linux.intel.com
---
Documentation
Move the x86 PMEM API implementation out of asm/cacheflush.h and into
its own header asm/pmem.h. This will allow members of the PMEM API to
be more easily identified on this and other architectures.
Signed-off-by: Ross Zwisler ross.zwis...@linux.intel.com
Suggested-by: Christoph Hellwig h
Update the DAX I/O path so that all operations that store data (I/O
writes, zeroing blocks, punching holes, etc.) properly synchronize the
stores to media using the PMEM API. This ensures that the data DAX is
writing is durable on media before the operation completes.
Signed-off-by: Ross Zwisler
On Wed, 2015-08-12 at 20:12 -0400, Dan Williams wrote:
Kill arch_memremap_pmem() and just let the architecture specify the
flags to be passed to memremap(). Default to writethrough by default.
Cc: Ross Zwisler ross.zwis...@linux.intel.com
Suggested-by: Christoph Hellwig h...@lst.de
Signed
On Wed, 2015-08-12 at 20:12 -0400, Dan Williams wrote:
From: Christoph Hellwig h...@lst.de
Signed-off-by: Christoph Hellwig h...@lst.de
[djbw: tools/testing/nvdimm/ and memumap_pmem support]
Signed-off-by: Dan Williams dan.j.willi...@intel.com
Reviewed-by: Ross Zwisler ross.zwis
On Thu, 2015-08-13 at 14:11 -0700, Dan Williams wrote:
On Thu, Aug 13, 2015 at 9:51 AM, Ross Zwisler
ross.zwis...@linux.intel.com wrote:
Update the DAX I/O path so that all operations that store data (I/O
writes, zeroing blocks, punching holes, etc.) properly synchronize the
stores
On Thu, 2015-08-13 at 14:20 -0700, Dan Williams wrote:
On Thu, Aug 13, 2015 at 9:51 AM, Ross Zwisler
ross.zwis...@linux.intel.com wrote:
Update the annotation for the kaddr pointer returned by direct_access()
so that it is a __pmem pointer. This is consistent with the PMEM driver
.
Signed-off-by: Ross Zwisler ross.zwis...@linux.intel.com
---
arch/x86/Kconfig | 1 +
arch/x86/include/asm/cacheflush.h | 2 ++
drivers/acpi/Kconfig | 1 +
drivers/acpi/nfit.c | 55 ++-
drivers/acpi/nfit.h
On Fri, 2015-08-14 at 14:05 -0700, Dan Williams wrote:
On Fri, Aug 14, 2015 at 1:43 PM, Ross Zwisler
ross.zwis...@linux.intel.com wrote:
Add support for the read flush _DSM flag, as outlined in the DSM spec:
http://pmem.io/documents/NVDIMM_DSM_Interface_Example.pdf
This flag tells
.
Signed-off-by: Ross Zwisler <ross.zwis...@linux.intel.com>
---
fs/dax.c| 161 ++--
include/linux/dax.h | 1 +
mm/huge_memory.c| 14 ++---
mm/page-writeback.c | 9 +++
4 files changed, 172 insertions(+), 13 deletions(-)
diff
() in response to the REQ_FLUSH to ensure that before we return all
the flushed data has been durably stored on the media.
Signed-off-by: Ross Zwisler <ross.zwis...@linux.intel.com>
---
drivers/nvdimm/pmem.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/
() an entry in the struct inode_operations
table so that we can access the correct get_block() routine in the
context of the writeback infrastructure.
Signed-off-by: Ross Zwisler <ross.zwis...@linux.intel.com>
---
fs/ext2/file.c | 1 +
fs/ext4/file.c | 1 +
fs/xfs/xfs_iops.c | 1 +
i
)
that are marked with the PAGECACHE_TAG_TOWRITE tag.
Signed-off-by: Ross Zwisler <ross.zwis...@linux.intel.com>
---
include/linux/pagemap.h | 3 +++
mm/filemap.c| 61 +
2 files changed, 64 insertions(+)
diff --git a/include/linux/pagemap.h b/i
The function __arch_wb_cache_pmem() was already an internal implementation
detail of the x86 PMEM API, but this functionality needs to be exported as
part of the general PMEM API to handle the fsync/msync case for DAX mmaps.
Signed-off-by: Ross Zwisler <ross.zwis...@linux.intel.com>
---
ar
of exceptional entry should be able to be found in a
radix tree at a time depending on how it is being used.
Signed-off-by: Ross Zwisler <ross.zwis...@linux.intel.com>
---
fs/inode.c | 1 +
include/linux/dax.h| 5 +
include/linux/fs.h | 1 +
include/linux
Previously the functionality offered by dax_pfn_mkwrite() was open-coded in
XFS and ext2. With the addition of DAX msync/fsync support we need to call
dax_pfn_mkwrite() so that the newly writeable page can be added to the
radix tree and marked as dirty.
Signed-off-by: Ross Zwisler <ross.z
Add ext4_dax_pfn_mkwrite() that properly protects against freeze, sets
the file update time and calls into dax_pfn_mkwrite() to add the newly
dirtied page to the radix tree which tracks dirty DAX pages.
Signed-off-by: Ross Zwisler <ross.zwis...@linux.intel.com>
---
fs/ext4/file.
Similar to follow_pte(), follow_pte_pmd() allows either a PTE leaf or a
huge page PMD leaf to be found and returned.
Signed-off-by: Ross Zwisler <ross.zwis...@linux.intel.com>
---
include/linux/mm.h | 2 ++
mm/memory.c| 41 +
2 files chang
Introduce pgoff_mkclean() which conceptually is similar to page_mkclean()
except it works in the absence of struct page and it can also be used to
clean PMDs. This is needed for DAX's dirty page handling.
Signed-off-by: Ross Zwisler <ross.zwis...@linux.intel.com>
---
include/linux/rmap.
Currently PMD pages can be dirtied via pmd_mkdirty(), but cannot be
cleaned. For DAX mmap dirty page tracking we need to be able to clean PMD
pages when we flush them to media so that we get a new write fault the next
time the are written to.
Signed-off-by: Ross Zwisler <ross.z
l
[2] http://marc.info/?l=linux-ext4=144550211312472=2
[3] https://lists.01.org/pipermail/linux-nvdimm/2015-October/002614.html
Ross Zwisler (11):
pmem: add wb_cache_pmem() to the PMEM API
mm: add pmd_mkclean()
pmem: enable REQ_FLUSH handling
dax: support dirty DAX entries in radix tree
On Thu, Oct 29, 2015 at 02:12:04PM -0600, Ross Zwisler wrote:
> This patch series adds support for fsync/msync to DAX.
>
> Patches 1 through 8 add various utilities that the DAX code will eventually
> need, and the DAX code itself is added by patch 9. Patches 10 and 11 are
> fil
instructions for clear_page(), and arch_clear_pmem() was
> always incurring the cost of __arch_wb_cache_pmem().
>
> Clean up the assumption that doing clear_pmem() a page at a time is more
> performant.
>
> Cc: Ross Zwisler <ross.zwis...@linux.intel.com>
> Reported-by: Dave Hansen
On Tue, Oct 27, 2015 at 09:19:30AM +1100, Dave Chinner wrote:
> On Mon, Oct 26, 2015 at 05:56:30PM +0900, Dan Williams wrote:
> > On Mon, Oct 26, 2015 at 3:23 PM, Dave Chinner wrote:
> > > Also, DAX access isn't a property of mmap - it's a property
> > > of the inode. We
On Wed, Oct 28, 2015 at 06:24:29PM -0400, Jeff Moyer wrote:
> Ross Zwisler <ross.zwis...@linux.intel.com> writes:
>
> > This series implements the very slow but correct handling for
> > blkdev_issue_flush() with DAX mappings, as discussed here:
> >
> >
this gives us correctness even if the performance is quite bad.
Userspace applications looking to avoid the fsync/msync penalty should
consider more fine-grained flushing via the NVML library:
https://github.com/pmem/nvml
Signed-off-by: Ross Zwisler <ross.zwis...@linux.intel.com>
---
drivers/
The function __arch_wb_cache_pmem() was already an internal implementation
detail of the x86 PMEM API, but this functionality needs to be exported as
part of the general PMEM API to handle the fsync/msync case for DAX mmaps.
Signed-off-by: Ross Zwisler <ross.zwis...@linux.intel.com>
---
ar
that the cost of blindly flushing the entire PMEM namespace on each
fsync or msync will be prohibitively expensive, and that we'll by very
incentivized to move to the radix tree based dirty page tracking as soon as
possible. :)
Ross Zwisler (2):
pmem: add wb_cache_pmem() to the PMEM API
pmem
sposition
> it for the merge window.
>
> ===
> for-4.4/dax-fixes:
> ===
> Ross Zwisler (2):
> dax: dax_pfn_mkwrite() truncate race check
We can drop this patch for dax_pfn_mkwrite() as that whole function is going
away after we merge the locking fixes from XFS, ext2 an
Currently PMD pages can be dirtied via pmd_mkdirty(), but cannot be
cleaned. For DAX mmap dirty page tracking we need to be able to clean PMD
pages when we flush them to media so that we get a new write fault the next
time the are written to.
Signed-off-by: Ross Zwisler <ross.z
wmb_pmem().
Signed-off-by: Ross Zwisler <ross.zwis...@linux.intel.com>
---
arch/x86/include/asm/pmem.h | 11 ++-
include/linux/pmem.h| 22 +-
2 files changed, 27 insertions(+), 6 deletions(-)
diff --git a/arch/x86/include/asm/pmem.h b/arch/x86/include/asm/
to flush all dirty pages to media. The PMEM driver then just has issue a
wmb_pmem() in response to the REQ_FLUSH to ensure that before we return all
the flushed data has been durably stored on the media.
Signed-off-by: Ross Zwisler <ross.zwis...@linux.intel.com>
---
drivers/nvdimm/pmem
because it's not a requirement that each of the
potentially many VMAs associated with a given struct address_space have a
mapping set up for our pgoff.
Signed-off-by: Ross Zwisler <ross.zwis...@linux.intel.com>
---
include/linux/rmap.h | 5 +
mm/rmap.c
101 - 200 of 2219 matches
Mail list logo