Re: [dm-devel] [PATCH 2/2] dm-writecache

2018-02-13 Thread Dan Williams
On Tue, Feb 13, 2018 at 5:24 PM, Mikulas Patocka wrote: > > > On Tue, 13 Feb 2018, Dan Williams wrote: > >> On Tue, Feb 13, 2018 at 2:00 PM, Mikulas Patocka wrote: >> > >> > >> > On Fri, 8 Dec 2017, Dan Williams wrote: >> > >> >> > > > when we write to >> >> > > > persistent memory using cached w

Re: [dm-devel] [PATCH 2/2] dm-writecache

2018-02-13 Thread Mikulas Patocka
On Tue, 13 Feb 2018, Dan Williams wrote: > On Tue, Feb 13, 2018 at 2:00 PM, Mikulas Patocka wrote: > > > > > > On Fri, 8 Dec 2017, Dan Williams wrote: > > > >> > > > when we write to > >> > > > persistent memory using cached write instructions and use dax_flush > >> > > > afterwards to flush ca

Re: [dm-devel] [PATCH 2/2] dm-writecache

2018-02-13 Thread Dan Williams
On Tue, Feb 13, 2018 at 2:00 PM, Mikulas Patocka wrote: > > > On Fri, 8 Dec 2017, Dan Williams wrote: > >> > > > when we write to >> > > > persistent memory using cached write instructions and use dax_flush >> > > > afterwards to flush cache for the affected range, the performance is >> > > > abo

Re: [dm-devel] [PATCH 2/2] dm-writecache

2018-02-13 Thread Mikulas Patocka
On Fri, 8 Dec 2017, Dan Williams wrote: > > > > when we write to > > > > persistent memory using cached write instructions and use dax_flush > > > > afterwards to flush cache for the affected range, the performance is > > > > about > > > > 350MB/s. It is practically unusable - worse than low-en

Re: [dm-devel] [PATCH 2/2] dm-writecache

2017-12-22 Thread Dan Williams
On Fri, Dec 22, 2017 at 12:56 PM, Mikulas Patocka wrote: > > > On Fri, 8 Dec 2017, Dan Williams wrote: > >> > > What about memcpy_flushcache? >> > >> > but >> > >> > - using memcpy_flushcache is overkill if we need just one or two 8-byte >> > writes to the metadata area. Why not use movnti directl

Re: [dm-devel] [PATCH 2/2] dm-writecache

2017-12-22 Thread Mikulas Patocka
On Fri, 8 Dec 2017, Dan Williams wrote: > > > What about memcpy_flushcache? > > > > but > > > > - using memcpy_flushcache is overkill if we need just one or two 8-byte > > writes to the metadata area. Why not use movnti directly? > > > > The driver performs so many 8-byte moves that the cost of

Re: [dm-devel] [PATCH 2/2] dm-writecache

2017-12-08 Thread Dan Williams
On Mon, Dec 4, 2017 at 9:40 PM, Mikulas Patocka wrote: > On Mon, 27 Nov 2017, Dan Williams wrote: [..] > > > So, according to the document, flushing the cache should be enough for > > > writes to reach persistent memory. > > > > The document assumes ADR is present. > > Could there be a case where

Re: [dm-devel] [PATCH 2/2] dm-writecache

2017-12-04 Thread Mikulas Patocka
On Mon, 27 Nov 2017, Dan Williams wrote: > On Mon, Nov 27, 2017 at 8:01 PM, Mikulas Patocka wrote: > > > > > > > > On Fri, 24 Nov 2017, Dan Williams wrote: > > > > > On Wed, Nov 22, 2017 at 6:36 PM, Mikulas Patocka > > > wrote: > > > > Hi > > > > > > > > Here I'm sending slighly update dm-wri

Re: [dm-devel] [PATCH 2/2] dm-writecache

2017-11-27 Thread Dan Williams
On Mon, Nov 27, 2017 at 8:01 PM, Mikulas Patocka wrote: > > > > On Fri, 24 Nov 2017, Dan Williams wrote: > > > On Wed, Nov 22, 2017 at 6:36 PM, Mikulas Patocka > > wrote: > > > Hi > > > > > > Here I'm sending slighly update dm-writecache target. > > > > > > > I would expect some theory of operat

Re: [dm-devel] [PATCH 2/2] dm-writecache

2017-11-27 Thread Mikulas Patocka
On Fri, 24 Nov 2017, Dan Williams wrote: > On Wed, Nov 22, 2017 at 6:36 PM, Mikulas Patocka wrote: > > Hi > > > > Here I'm sending slighly update dm-writecache target. > > > > I would expect some theory of operation documentation in the changelog > or in Documentation/ for a new driver. It ca

Re: [dm-devel] [PATCH 2/2] dm-writecache

2017-11-24 Thread Dan Williams
On Wed, Nov 22, 2017 at 6:36 PM, Mikulas Patocka wrote: > Hi > > Here I'm sending slighly update dm-writecache target. > I would expect some theory of operation documentation in the changelog or in Documentation/ for a new driver. > Signed-off-by: Mikulas Patocka > [..] > +/* > + * The clflusho

Re: [dm-devel] [PATCH 2/2] dm-writecache

2017-11-23 Thread Mikulas Patocka
On Thu, 23 Nov 2017, Dan Williams wrote: > On Thu, Nov 23, 2017 at 12:29 AM, Christoph Hellwig > wrote: > >> +/* > >> + * The clflushopt instruction is very slow on Broadwell, so we use > >> non-temporal > >> + * stores instead. > >> + */ > >> +#ifdef CONFIG_X86_64 > >> +#define NT_STORE(dest

Re: [dm-devel] [PATCH 2/2] dm-writecache

2017-11-23 Thread Dan Williams
On Thu, Nov 23, 2017 at 12:29 AM, Christoph Hellwig wrote: >> +/* >> + * The clflushopt instruction is very slow on Broadwell, so we use >> non-temporal >> + * stores instead. >> + */ >> +#ifdef CONFIG_X86_64 >> +#define NT_STORE(dest, src) asm ("movnti %1, %0" : "=m"(dest) : "r"(src)) >> +#defi

Re: [dm-devel] [PATCH 2/2] dm-writecache

2017-11-23 Thread Christoph Hellwig
> +/* > + * The clflushopt instruction is very slow on Broadwell, so we use > non-temporal > + * stores instead. > + */ > +#ifdef CONFIG_X86_64 > +#define NT_STORE(dest, src) asm ("movnti %1, %0" : "=m"(dest) : "r"(src)) > +#define FLUSH_RANGE(dax, ptr, size) do { } while (0) > +#define COMMIT_F