Re: [PATCH v5 1/5] mm: add vm_insert_mixed_mkwrite()

2017-07-25 Thread Jan Kara
On Tue 25-07-17 10:01:58, Christoph Hellwig wrote: > On Tue, Jul 25, 2017 at 01:14:00AM +0300, Kirill A. Shutemov wrote: > > I guess it's up to filesystem if it wants to reuse the same spot to write > > data or not. I think your assumptions works for ext4 and xfs. I wouldn't > > be that sure for

[PATCH 3/6] arm64: Expose DC CVAP to userspace

2017-07-25 Thread Robin Murphy
The ARMv8.2-DCPoP feature introduces persistent memory support to the architecture, by defining a point of persistence in the memory hierarchy, and a corresponding cache maintenance operation, DC CVAP. Expose the support via HWCAP and MRS emulation. Signed-off-by: Robin Murphy

[PATCH 6/6] arm64: uaccess: Implement *_flushcache variants

2017-07-25 Thread Robin Murphy
Implement the set of copy functions with guarantees of a clean cache upon completion necessary to support the pmem driver. Signed-off-by: Robin Murphy --- arch/arm64/Kconfig | 1 + arch/arm64/include/asm/string.h | 4

[PATCH 0/6] arm64 pmem support

2017-07-25 Thread Robin Murphy
Hi all, With the latest updates to the pmem API, the arch code contribution becomes very straightforward to wire up - I think there's about as much code here to just cope with the existence of our new instruction as there is to actually make use of it. I don't have access to any NVDIMMs nor

[PATCH 2/6] arm64: Convert __inval_cache_range() to area-based

2017-07-25 Thread Robin Murphy
__inval_cache_range() is already the odd one out among our data cache maintenance routines as the only remaining range-based one; as we're going to want an invalidation routine to call from C code for the pmem API, let's tweak the prototype and name to bring it in line with the clean operations,

[PATCH 1/6] arm64: mm: Fix set_memory_valid() declaration

2017-07-25 Thread Robin Murphy
Clearly, set_memory_valid() has never been seen in the same room as its declaration... Whilst the type mismatch is such that kexec probably wasn't broken in practice, fix it to match the definition as it should. Fixes: 9b0aa14e3155 ("arm64: mm: add set_memory_valid()") Signed-off-by: Robin Murphy

[PATCH 5/6] arm64: Implement pmem API support

2017-07-25 Thread Robin Murphy
Add a clean-to-point-of-persistence cache maintenance helper, and wire up the basic architectural support for the pmem driver based on it. Signed-off-by: Robin Murphy --- arch/arm64/Kconfig | 11 +++ arch/arm64/include/asm/assembler.h | 6 ++

Re: KVM "fake DAX" flushing interface - discussion

2017-07-25 Thread Pankaj Gupta
> Subject: Re: KVM "fake DAX" flushing interface - discussion > > On Mon 24-07-17 08:06:07, Pankaj Gupta wrote: > > > > > On Sun 23-07-17 13:10:34, Dan Williams wrote: > > > > On Sun, Jul 23, 2017 at 11:10 AM, Rik van Riel wrote: > > > > > On Sun, 2017-07-23 at 09:01 -0700,

Re: KVM "fake DAX" flushing interface - discussion

2017-07-25 Thread Dan Williams
On Tue, Jul 25, 2017 at 7:27 AM, Pankaj Gupta wrote: > >> Subject: Re: KVM "fake DAX" flushing interface - discussion >> >> On Mon 24-07-17 08:06:07, Pankaj Gupta wrote: >> > >> > > On Sun 23-07-17 13:10:34, Dan Williams wrote: >> > > > On Sun, Jul 23, 2017 at 11:10 AM, Rik

Re: [PATCH v5 1/5] mm: add vm_insert_mixed_mkwrite()

2017-07-25 Thread Christoph Hellwig
On Tue, Jul 25, 2017 at 11:35:08AM +0200, Jan Kara wrote: > On Tue 25-07-17 10:01:58, Christoph Hellwig wrote: > > On Tue, Jul 25, 2017 at 01:14:00AM +0300, Kirill A. Shutemov wrote: > > > I guess it's up to filesystem if it wants to reuse the same spot to write > > > data or not. I think your

Re: [PATCH v5 1/5] mm: add vm_insert_mixed_mkwrite()

2017-07-25 Thread Jan Kara
On Tue 25-07-17 14:15:22, Christoph Hellwig wrote: > On Tue, Jul 25, 2017 at 11:35:08AM +0200, Jan Kara wrote: > > On Tue 25-07-17 10:01:58, Christoph Hellwig wrote: > > > On Tue, Jul 25, 2017 at 01:14:00AM +0300, Kirill A. Shutemov wrote: > > > > I guess it's up to filesystem if it wants to reuse

Re: [PATCH v5 1/5] mm: add vm_insert_mixed_mkwrite()

2017-07-25 Thread Kirill A. Shutemov
On Tue, Jul 25, 2017 at 02:50:37PM +0200, Jan Kara wrote: > On Tue 25-07-17 14:15:22, Christoph Hellwig wrote: > > On Tue, Jul 25, 2017 at 11:35:08AM +0200, Jan Kara wrote: > > > On Tue 25-07-17 10:01:58, Christoph Hellwig wrote: > > > > On Tue, Jul 25, 2017 at 01:14:00AM +0300, Kirill A. Shutemov

Re: Moving ndctl development into the kernel tree?

2017-07-25 Thread Chris Mason
On 07/22/2017 02:49 PM, Dan Williams wrote: On Fri, Jul 21, 2017 at 7:52 PM, Dan Williams wrote: [ adding Chris ] On Fri, Jul 21, 2017 at 4:44 PM, Dan Williams wrote: On Fri, Jul 21, 2017 at 3:58 PM, Ingo Molnar wrote:

Re: FIle copy to FAT FS on NVDIMM hits BUG_ON at fs/buffer.c:3305!

2017-07-25 Thread Kani, Toshimitsu
On Tue, 2017-07-25 at 16:22 -0600, Ross Zwisler wrote: > On Tue, Jul 25, 2017 at 09:37:38PM +, Kani, Toshimitsu wrote: > > Hi, > > > > Copying files to vfat FS on an NVDIMM device hits > > BUG_ON(!PageLocked(page)) in try_to_free_buffers().  It happens on > > 4.13-rc1, and happens on older

Re: [PATCH 3/4] ndctl: switch to tools/include/linux/{kernel, list, bitmap}.h

2017-07-25 Thread Arnaldo Carvalho de Melo
Em Tue, Jul 25, 2017 at 03:36:26PM -0700, Dan Williams escreveu: > Replace the ccan implementation of list primitives, bitmap helpers and > small utility macros with the common definitions available in > tool/include/linux. You should first add what you need in separate patches, paving the way to

Re: [PATCH v5 1/5] mm: add vm_insert_mixed_mkwrite()

2017-07-25 Thread Christoph Hellwig
On Tue, Jul 25, 2017 at 01:14:00AM +0300, Kirill A. Shutemov wrote: > I guess it's up to filesystem if it wants to reuse the same spot to write > data or not. I think your assumptions works for ext4 and xfs. I wouldn't > be that sure for btrfs or other filesystems with CoW support. Or XFS with

[PATCH] dm,dax: Make sure dm_dax_flush() is called if device supports it

2017-07-25 Thread Vivek Goyal
Right now, dm_dax_flush() is not being called and I think it is not being called becuase DAXDEV_WRITE_CACHE is not set on dm dax device. If underlying dax device supports write cache, set DAXDEV_WRITE_CACHE on dm dax device. This will get dm_dax_flush() being called. Signed-off-by: Vivek Goyal

Re: [PATCH v8 1/1] f2fs: dax: implement direct access

2017-07-25 Thread Jaegeuk Kim
Hi Dan, On 07/25, Dan Williams wrote: > [ adding linux-nvdimm ] > > On Thu, Jul 20, 2017 at 5:10 AM, sunqiuyang wrote: > > From: Qiuyang Sun > > > > This patch implements Direct Access (DAX) in F2FS, including: > > - a mount option to choose

Re: dm,dax: Make sure dm_dax_flush() is called if device supports it

2017-07-25 Thread Mike Snitzer
On Tue, Jul 25 2017 at 3:43pm -0400, Vivek Goyal wrote: > Right now, dm_dax_flush() is not being called and I think it is not being > called becuase DAXDEV_WRITE_CACHE is not set on dm dax device. > > If underlying dax device supports write cache, set DAXDEV_WRITE_CACHE on >

Re: [PATCH] dm,dax: Make sure dm_dax_flush() is called if device supports it

2017-07-25 Thread Vivek Goyal
On Tue, Jul 25, 2017 at 01:43:27PM -0700, Dan Williams wrote: > On Tue, Jul 25, 2017 at 12:43 PM, Vivek Goyal wrote: > > Right now, dm_dax_flush() is not being called and I think it is not being > > called becuase DAXDEV_WRITE_CACHE is not set on dm dax device. > > > > If

FIle copy to FAT FS on NVDIMM hits BUG_ON at fs/buffer.c:3305!

2017-07-25 Thread Kani, Toshimitsu
Hi, Copying files to vfat FS on an NVDIMM device hits BUG_ON(!PageLocked(page)) in try_to_free_buffers(). It happens on 4.13-rc1, and happens on older kernels as well. A simple reproducer is shown below. It is 100% reproducible on my setup (8GB of regular memory and 16GB of NVDIMM). It

Re: [PATCH] dm,dax: Make sure dm_dax_flush() is called if device supports it

2017-07-25 Thread Dan Williams
On Tue, Jul 25, 2017 at 12:43 PM, Vivek Goyal wrote: > Right now, dm_dax_flush() is not being called and I think it is not being > called becuase DAXDEV_WRITE_CACHE is not set on dm dax device. > > If underlying dax device supports write cache, set DAXDEV_WRITE_CACHE on > dm

Re: FIle copy to FAT FS on NVDIMM hits BUG_ON at fs/buffer.c:3305!

2017-07-25 Thread Ross Zwisler
On Tue, Jul 25, 2017 at 09:37:38PM +, Kani, Toshimitsu wrote: > Hi, > > Copying files to vfat FS on an NVDIMM device hits > BUG_ON(!PageLocked(page)) in try_to_free_buffers(). It happens on > 4.13-rc1, and happens on older kernels as well. > > A simple reproducer is shown below. It is 100%

[PATCH 4/4] ndctl: switch to tools/lib/subcmd/

2017-07-25 Thread Dan Williams
Similar to perf, ndctl is based on the command and option-parsing infrastructure that originated in git and has now been refactored into a helper library in tools/lib/subcmd/. For the time being ndctl just recompiles the same source that perf uses, longer term we can look to unwind the use of

[PATCH 2/4] MAINTAINERS: add ndctl files to libnvdimm

2017-07-25 Thread Dan Williams
The ndctl project under tools/ndctl/ provides a helper utility and library interface to the libnvdimm sub-system. Signed-off-by: Dan Williams --- MAINTAINERS |1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index

[PATCH 1/4] ndctl: switch to kernel versioning scheme

2017-07-25 Thread Dan Williams
Similar to perf, now that ndctl is part of the kernel source tree it also shares the version number of the source tree. This is consistent with the policy of not maintaining separate version numbers for drivers within the kernel tree. The version can be overridden by a local 'version' file, but

[PATCH 3/4] ndctl: switch to tools/include/linux/{kernel, list, bitmap}.h

2017-07-25 Thread Dan Williams
Replace the ccan implementation of list primitives, bitmap helpers and small utility macros with the common definitions available in tool/include/linux. Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Arnaldo Carvalho de Melo Cc: Alexander

Re: [PATCH v8 1/1] f2fs: dax: implement direct access

2017-07-25 Thread Dan Williams
[ adding linux-nvdimm ] On Thu, Jul 20, 2017 at 5:10 AM, sunqiuyang wrote: > From: Qiuyang Sun > > This patch implements Direct Access (DAX) in F2FS, including: > - a mount option to choose whether to enable DAX or not We're in the process of