[dm-devel] [PATCH 2/2] dm-writecache: get rid of memory_data flush to writecache_flush_entry

2019-01-03 Thread Huaisheng Ye
From: Huaisheng Ye writecache_flush_region only works when SSD mode. If wc->pmem_mode sets, writecache_flush_region doesn't need to be called in writecache_flush_entry. Signed-off-by: Huaisheng Ye --- drivers/md/dm-writecache.c | 2 -- 1 file changed, 2 deletions(-) diff --git

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

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 > >> > > >

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

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

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

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

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

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 > > > > > >

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. > > > >

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/

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 > >>

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)

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

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

2017-11-22 Thread Mikulas Patocka
Hi Here I'm sending slighly update dm-writecache target. Signed-off-by: Mikulas Patocka --- drivers/md/Kconfig | 11 drivers/md/Makefile|1 drivers/md/dm-writecache.c | 2312 + 3 files changed, 2324