Re: [PATCH v2] lib/memweight.c: open codes bitmap_weight()

2019-08-25 Thread Denis Efremov
On 25.08.2019 09:11, Matthew Wilcox wrote: > On Sat, Aug 24, 2019 at 01:01:02PM +0300, Denis Efremov wrote: >> This patch open codes the bitmap_weight() call. The direct >> invocation of hweight_long() allows to remove the BUG_ON and >> excessive "longs to bits, bits to longs" conversion. > >

[PATCH 1/3] dm writecache: remove unused member pointer in writeback_struct

2019-08-25 Thread Huaisheng Ye
From: Huaisheng Ye The stucture member pointer page in writeback_struct never has been used actually. Remove it. Signed-off-by: Huaisheng Ye Acked-by: Mikulas Patocka --- drivers/md/dm-writecache.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/md/dm-writecache.c

[PATCH 3/3] dm writecache: optimize performance by sorting the blocks for writeback_all

2019-08-25 Thread Huaisheng Ye
From: Huaisheng Ye During the process of writeback, the blocks, which have been placed in wbl.list for writeback soon, are partially ordered for the contiguous ones. When writeback_all has been set, for most cases, also by default, there will be a lot of blocks in pmem need to writeback at the

[PATCH 2/3] dm writecache: add unlikely for getting two block with same LBA

2019-08-25 Thread Huaisheng Ye
From: Huaisheng Ye In function writecache_writeback, entries g and f has same original sector only happens at entry f has been committed, but entry g has NOT yet. The probability of this happening is very low in the following 256 blocks at most of entry e. Signed-off-by: Huaisheng Ye

[PATCH 0/3] optimize writecache_writeback for performance

2019-08-25 Thread Huaisheng Ye
From: Huaisheng Ye Patch 1 and 2 are used for cleaning the code, and they have got Acked-by from Mikulas. Patch 3 is used for performance optimization when writeback_all, which could save more than half of time. Of course, if the blocks in writecache are more uncontinuous and disordered, the

Re: [PATCH v2] lib/memweight.c: open codes bitmap_weight()

2019-08-25 Thread Matthew Wilcox
On Sat, Aug 24, 2019 at 01:01:02PM +0300, Denis Efremov wrote: > This patch open codes the bitmap_weight() call. The direct > invocation of hweight_long() allows to remove the BUG_ON and > excessive "longs to bits, bits to longs" conversion. Honestly, that's not the problem with this function.