Re: [dm-devel] [PATCH] vmalloc: introduce vmap_pfn for persistent memory

2017-11-08 Thread Dan Williams
On Wed, Nov 8, 2017 at 12:26 PM, Mikulas Patocka wrote: > On Wed, 8 Nov 2017, Christoph Hellwig wrote: > >> Can you start by explaining what you actually need the vmap for? > > It is possible to use lvm on persistent memory. You can create linear or > striped logical volumes on persistent memory a

Re: [dm-devel] [PATCH] vmalloc: introduce vmap_pfn for persistent memory

2017-11-08 Thread Mikulas Patocka
On Wed, 8 Nov 2017, Christoph Hellwig wrote: > Can you start by explaining what you actually need the vmap for? It is possible to use lvm on persistent memory. You can create linear or striped logical volumes on persistent memory and these volumes still have the direct_access method, so they

Re: [dm-devel] [PATCH] vmalloc: introduce vmap_pfn for persistent memory

2017-11-08 Thread Dan Williams
On Wed, Nov 8, 2017 at 12:15 PM, Mikulas Patocka wrote: > > > On Wed, 8 Nov 2017, Dan Williams wrote: > >> On Wed, Nov 8, 2017 at 7:35 AM, Christoph Hellwig wrote: >> > On Wed, Nov 08, 2017 at 10:21:38AM -0500, Mikulas Patocka wrote: >> >> > And what do you do for an architecture with virtuall in

Re: [dm-devel] [PATCH] vmalloc: introduce vmap_pfn for persistent memory

2017-11-08 Thread Mikulas Patocka
On Wed, 8 Nov 2017, Dan Williams wrote: > On Wed, Nov 8, 2017 at 7:35 AM, Christoph Hellwig wrote: > > On Wed, Nov 08, 2017 at 10:21:38AM -0500, Mikulas Patocka wrote: > >> > And what do you do for an architecture with virtuall indexed caches? > >> > >> Persistent memory is not supported on suc

Re: [ndctl PATCH] libndctl, nfit: Fix in/out sizes for error injection commands

2017-11-08 Thread Verma, Vishal L
On Wed, 2017-11-08 at 10:48 -0800, Dan Williams wrote: > On Wed, Nov 8, 2017 at 10:07 AM, Dan Williams om> wrote: > > On Tue, Nov 7, 2017 at 2:50 PM, Vishal Verma > com> wrote: > > > The input/output size bounds being set in the various > > > nd_bus_cmd_new_* > > > helpers for error injection com

Re: [ndctl PATCH] libndctl, nfit: Fix in/out sizes for error injection commands

2017-11-08 Thread Dan Williams
On Wed, Nov 8, 2017 at 10:07 AM, Dan Williams wrote: > On Tue, Nov 7, 2017 at 2:50 PM, Vishal Verma wrote: >> The input/output size bounds being set in the various nd_bus_cmd_new_* >> helpers for error injection commands were larger than they needed to be, >> and platforms could reject these. Fix

Re: [ndctl PATCH] libndctl, nfit: Fix in/out sizes for error injection commands

2017-11-08 Thread Dan Williams
On Tue, Nov 7, 2017 at 2:50 PM, Vishal Verma wrote: > The input/output size bounds being set in the various nd_bus_cmd_new_* > helpers for error injection commands were larger than they needed to be, > and platforms could reject these. Fix the bounds to be exactly as the > spec describes. > > Cc:

Re: [dm-devel] [PATCH] vmalloc: introduce vmap_pfn for persistent memory

2017-11-08 Thread Christoph Hellwig
Can you start by explaining what you actually need the vmap for? Going through a vmap for every I/O is certainly not going to be nice on NVDIMM-N or similar modules :) ___ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/l

Re: [dm-devel] [PATCH] vmalloc: introduce vmap_pfn for persistent memory

2017-11-08 Thread Mikulas Patocka
On Wed, 8 Nov 2017, Christoph Hellwig wrote: > On Wed, Nov 08, 2017 at 10:21:38AM -0500, Mikulas Patocka wrote: > > > And what do you do for an architecture with virtuall indexed caches? > > > > Persistent memory is not supported on such architectures - it is only > > supported on x86-64 and a

Re: [PATCH] nfit_test: stricter bounds checking for error injection commands

2017-11-08 Thread Dan Williams
On Tue, Nov 7, 2017 at 2:48 PM, Vishal Verma wrote: > Ensure that the in/out sizes passed in the nd_cmd_package are sane for > the fixed output size commands (i.e. inject error and clear injected > error). > > Cc: Dan Williams > Signed-off-by: Vishal Verma Looks good, I'll also add a: Reported

Re: [dm-devel] [PATCH] vmalloc: introduce vmap_pfn for persistent memory

2017-11-08 Thread Dan Williams
On Wed, Nov 8, 2017 at 7:35 AM, Christoph Hellwig wrote: > On Wed, Nov 08, 2017 at 10:21:38AM -0500, Mikulas Patocka wrote: >> > And what do you do for an architecture with virtuall indexed caches? >> >> Persistent memory is not supported on such architectures - it is only >> supported on x86-64 a

Re: [dm-devel] [PATCH] vmalloc: introduce vmap_pfn for persistent memory

2017-11-08 Thread Christoph Hellwig
On Wed, Nov 08, 2017 at 10:21:38AM -0500, Mikulas Patocka wrote: > > And what do you do for an architecture with virtuall indexed caches? > > Persistent memory is not supported on such architectures - it is only > supported on x86-64 and arm64. For now. But once support is added your driver wil

Re: [PATCH] vmalloc: introduce vmap_pfn for persistent memory

2017-11-08 Thread Mikulas Patocka
On Wed, 8 Nov 2017, Christoph Hellwig wrote: > On Wed, Nov 08, 2017 at 07:33:09AM -0500, Mikulas Patocka wrote: > > We could use the function clwb() (or arch-independent wrapper dax_flush()) > > - that uses the clflushopt instruction on Broadwell or clwb on Skylake - > > but it is very slow, w

Re: [PATCH] vmalloc: introduce vmap_pfn for persistent memory

2017-11-08 Thread Christoph Hellwig
On Wed, Nov 08, 2017 at 07:33:09AM -0500, Mikulas Patocka wrote: > We could use the function clwb() (or arch-independent wrapper dax_flush()) > - that uses the clflushopt instruction on Broadwell or clwb on Skylake - > but it is very slow, write performance on Broadwell is only 350MB/s. > > So i

Re: [PATCH] vmalloc: introduce vmap_pfn for persistent memory

2017-11-08 Thread Mikulas Patocka
On Wed, 8 Nov 2017, Christoph Hellwig wrote: > On Tue, Nov 07, 2017 at 05:03:11PM -0500, Mikulas Patocka wrote: > > Hi > > > > I am developing a driver that uses persistent memory for caching. A > > persistent memory device can be mapped in several discontiguous ranges. > > > > The kernel has

Re: [PATCH] vmalloc: introduce vmap_pfn for persistent memory

2017-11-08 Thread Christoph Hellwig
On Tue, Nov 07, 2017 at 05:03:11PM -0500, Mikulas Patocka wrote: > Hi > > I am developing a driver that uses persistent memory for caching. A > persistent memory device can be mapped in several discontiguous ranges. > > The kernel has a function vmap that takes an array of pointers to pages > a