Re: [LSF/MM ATTEND] block: multipage bvec upstreaming & next step

2017-01-19 Thread Coly Li
On 2017/1/17 上午11:56, Ming Lei wrote: > Hi Guys, > > The multipage bvec patchset[1] has been posted out for a while, and > xfstest(ext4, xfs and btrfs) have been run and no regression is > observed, and I hope having talk about this in person would help > moving it forward. > > Secondly I'd like

Re: [LSF/MM TOPIC] block level event logging for storage media management

2017-01-18 Thread Coly Li
structure for event logging. > > We will be able to show a prototype implementation during LSF/MM. This is an interesting topic. For stacked block devices, all layers higher than the fault layer will observe the media error, reporting the underlying failure in every layer may introduce quite a lot nois

Re: raid0 vs. mkfs

2016-12-08 Thread Coly Li
On 2016/12/9 上午3:19, Shaohua Li wrote: > On Fri, Dec 09, 2016 at 12:44:57AM +0800, Coly Li wrote: >> On 2016/12/8 上午12:59, Shaohua Li wrote: >>> On Wed, Dec 07, 2016 at 07:50:33PM +0800, Coly Li wrote: >> [snip] >>> Thanks for doing this, Coly! For raid0, th

extend bi_size to unsigned long ?

2016-12-13 Thread Coly Li
i_size will hurt DISCARD performance. I know this is not simple, it changes a very important KABI. But this is really an interesting question to ask: do we have any idea to extend bi_size from unsigned int to unsigned long ? Thanks in advance. Coly Li -- To unsubscribe from this list: send the l

extend bi_size to unsigned long ?

2016-12-13 Thread Coly Li
i_size will hurt DISCARD performance. I know this is not simple, it changes a very important KABI. But this is really an interesting question to ask: do we have any idea to extend bi_size from unsigned int to unsigned long ? Thanks in advance. -- Coly Li -- To unsubscribe from this lis

Re: raid0 vs. mkfs

2016-12-07 Thread Coly Li
24} Now we only need to call generic_make_request() for 4 times. The code is not simple, I need more time to write text to complain how it works. Currently you can treat it as a proof of concept. Signed-off-by: Coly Li <col...@suse.de> --- drivers/md/raid0.c | 224 +++

Re: [Lsf-pc] [LSF/MM TOPIC] [LSF/MM ATTEND] md raid general discussion

2017-01-12 Thread Coly Li
On 2017/1/12 下午11:09, Sagi Grimberg wrote: > Hey Coly, > >> Also I receive reports from users that raid1 performance is desired when >> it is built on NVMe SSDs as a cache (maybe bcache or dm-cache). I am >> working on some raid1 performance improvement (e.g. new raid1 I/O >> barrier and lockless

Re: [PATCH v1 07/54] bcache: comment on direct access to bvec table

2016-12-30 Thread Coly Li
d/bcache/util.c > @@ -222,6 +222,13 @@ uint64_t bch_next_delay(struct bch_ratelimit *d, > uint64_t done) > : 0; > } > > +/* > + * Generally it isn't good to access .bi_io_vec and .bi_vcnt > + * directly, the preferred way is bio_add_page, but in > + * this case, bch_bio

[LSF/MM TOPIC] [LSF/MM ATTEND] md raid general discussion

2017-01-09 Thread Coly Li
cuss. Therefore, if md raid developers may have a chance to sit together, discuss how to efficiently collaborate in next year, it will be much more productive then communicating on mailing list. Finally let me introduce myself for people don't know me. My name is Coly Li, I used to work on OCFS2,

Re: [PATCH v1 23/54] bcache: handle bio_clone() & bvec updating for multipage bvecs

2016-12-30 Thread Coly Li
O, q->bio_split); else split = clone; __bch_data_verity(gc, split); bio_put(split); } while (split != clone); I guess maybe the above style generates less binary code. -- Coly Li -- To unsubscribe from this list: send the line "unsubscribe linux-block" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v1 08/54] block: comment on bio_alloc_pages()

2016-12-30 Thread Coly Li
+ * has to make sure page count in this bio can be held > + * in the new cloned bio because each single page need > + * to assign to each bvec of the new bio. > + */ > check = bio_clone(bio, GFP_NOIO); > if (!check) > return; >

Re: [PATCH 17/19] bcache: fix for gc and write-back race

2017-08-03 Thread Coly Li
patch alloc a separate work-queue for write-back thread to avoid such > race. > > Signed-off-by: Tang Junhui <tang.jun...@zte.com.cn> > Cc: sta...@vger.kernel.org Add a per-cached device work queue is a good idea, it's OK to me. Acked-by: Coly Li <col...@suse.de> Thansk. C

Re: [PATCH 12/19] bcache: update bucket_in_use periodically

2017-07-11 Thread Coly Li
s not good news. Coly > > > > 发件人: Coly Li <i...@coly.li> > 收件人: linux-block@vger.kernel.org, Tang Junhui > <tang.jun...@zte.com.cn>, > 抄送:bca...@lists.ewheeler.net, linux-bca...@vger.kernel.org, > h...@infradead.org, ax...@kernel.dk > 日

Re: [PATCH 11/19] bcache: Subtract dirty sectors of thin flash from cache_sectors in calculating writeback rate

2017-07-10 Thread Coly Li
On 2017/7/1 上午4:43, bca...@lists.ewheeler.net wrote: > From: Tang Junhui > > Since dirty sectors of thin flash cannot be used to cache data for backend > device, so we should subtract it in calculating writeback rate. > I see you want to get ride of the noise of flash

Re: [PATCH 12/19] bcache: update bucket_in_use periodically

2017-07-10 Thread Coly Li
ke quite a long time for either bucket allocating code or bch_gc_thread(). What I concern is, this patch may introduce bucket allocation delay in period of GC_THREAD_TIMEOUT_MS. We need to find out a way to avoid such a performance regression. -- Coly Li

Re: [PATCH 09/19 v2] bcache: update bio->bi_opf bypass/writeback REQ_ flag hints

2017-07-10 Thread Coly Li
On 2017/7/6 下午11:24, Christoph Hellwig wrote: > On Thu, Jul 06, 2017 at 03:35:48PM +0800, Coly Li wrote: >> Then gfs2 breaks the above rule ? in gfs2_metapath_ra() and >> gfs2_dir_readahead(), only REQ_META is used in submit_bh(). It seems an >> extra REQ_PRIO should be

Re: [PATCH] bcache: only recovery I/O error for writethrough mode

2017-07-10 Thread Coly Li
On 2017/7/11 上午5:46, Kai Krakow wrote: > Am Mon, 10 Jul 2017 19:18:28 +0800 > schrieb Coly Li <col...@suse.de>: > >> If a read bio to cache device gets failed, bcache will try to >> recovery it by forward the read bio to backing device. If backing >> device re

[PATCH] bcache: only recovery I/O error for writethrough mode

2017-07-10 Thread Coly Li
->recoverable is set. For other cache mode, recovery I/O failure by reading backing device does not make sense, bache just simply returns -EIO immediately. Reported-by: Arne Wolf <aw...@lenovo.com> Signed-off-by: Coly Li <col...@suse.de> --- drivers/md/bcache/request.c | 5 - 1

Re: [PATCH 12/19] bcache: update bucket_in_use periodically

2017-07-11 Thread Coly Li
rty buckets number with bucket_lock held. If the latency is not that much, we can ignore the cost, otherwise we do need to find a better solution. Thanks. Coly > > > 发件人: Coly Li <i...@coly.li> > 收件人: linux-block@vger.kernel.org, Tang Junhui > <

Re: [PATCH 06/19] bcache: explicitly destory mutex while exiting

2017-07-11 Thread Coly Li
ot;destory mutex" patch unchanged, and send another > patch to fix the issue based on your approach. Please take a look. Thanks! > Sure, good idea. I'd like to review the next fix, and provide my feed back together. Thanks. Coly > Thanks, > Liang > > On Sun, Jul 2,

Re: [PATCH 19/19] bcache: Update continue_at() documentation

2017-07-08 Thread Coly Li
On 2017/7/1 上午4:43, bca...@lists.ewheeler.net wrote: > From: Dan Carpenter <dan.carpen...@oracle.com> > > continue_at() doesn't have a return statement anymore. > > Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com> Acked-by: Coly Li <col...@suse.de> T

Re: [PATCH 11/19] bcache: Subtract dirty sectors of thin flash from cache_sectors in calculating writeback rate

2017-07-12 Thread Coly Li
on this thread, or is the patch good to go? > > Please send your ack if you're happy with it so I can queue it up. I discussed with Tang offline, this patch is correct. But the patch commit log should be improved. Now I help to work on it, should be done quite soon. Coly >

Re: [PATCH 09/19 v2] bcache: update bio->bi_opf bypass/writeback REQ_ flag hints

2017-07-12 Thread Coly Li
On 2017/7/11 上午11:48, Coly Li wrote: > On 2017/7/6 下午11:24, Christoph Hellwig wrote: >> On Thu, Jul 06, 2017 at 03:35:48PM +0800, Coly Li wrote: >>> Then gfs2 breaks the above rule ? in gfs2_metapath_ra() and >>> gfs2_dir_readahead(), only REQ_META is used in submit_

Re: [PATCH] bcache: only recovery I/O error for writethrough mode

2017-07-11 Thread Coly Li
s not make sense, >> bache just simply returns -EIO immediately. >> >> Reported-by: Arne Wolf <aw...@lenovo.com> >> Signed-off-by: Coly Li <col...@suse.de> >> --- >> drivers/md/bcache/request.c | 5 - >> 1 file changed, 4 insertions(+), 1 del

Re: [PATCH] bcache: only recovery I/O error for writethrough mode

2017-07-11 Thread Coly Li
en cached >>>> device is in writethough mode, and s->recoverable is set. For other > cache >>>> mode, recovery I/O failure by reading backing device does not make > sense, >>>> bache just simply returns -EIO immediately. >>>> >>>> Reported

handling cache device disconnection more properly ( was Re: [PATCH] bcache: only recovery I/O error for writethrough mode)

2017-07-13 Thread Coly Li
What we are discussing is more then the original patch, now the topic changes to how handling cache device disconnection more properly. So I change email thread subject. On 2017/7/13 上午8:53, Eric Wheeler wrote: > On Wed, 12 Jul 2017, Coly Li wrote: > >> On 2017/7/12 上午10:

Re: [PATCH 18/19] bcache: silence static checker warning

2017-07-13 Thread Coly Li
> - if (!c) > - closure_return(cl); > - > bch_cache_accounting_destroy(>accounting); > > kobject_put(>internal); > Agree, cache_set_flush() is only called from a continue_at() in __cache_set_unregister(). In this case, cl is always not NULL. Reviewed-by: Coly Li <col...@suse.de> Thanks. -- Coly Li

Re: [PATCH 15/19] bcache: fix issue of writeback rate at minimum 1 key per second

2017-07-16 Thread Coly Li
& > - !dc->writeback_running)) { > + ((!dc->writeback_rate.rate || !dc->writeback_running) && > + !test_bit(BCACHE_DEV_DETACHING, >disk.flags))) { > up_write(>writeback_lock); > set_current_state(TASK_INTERRUPTIBLE); > > if (kthread_should_stop()) > return 0; > > - schedule(); > + schedule_timeout(WRITE_BACK_WAIT_CYCLE); > continue; > } > > -- Coly Li

Re: [PATCH v2 3/3] md: raid1-10: move raid1/raid10 common code into raid1-10.c

2017-07-15 Thread Coly Li
On 2017/7/14 下午4:14, Ming Lei wrote: > No function change, just move 'struct resync_pages' and related > helpers into raid1-10.c Please give me a hint, I don't find where raid1-10.c is Thanks. Coly > > Signed-off-by: Ming Lei > --- > drivers/md/md.h | 53

Re: [PATCH] bcache: only recovery I/O error for writethrough mode

2017-07-11 Thread Coly Li
On 2017/7/12 上午1:42, Eric Wheeler wrote: > On Tue, 11 Jul 2017, Coly Li wrote: >> On 2017/7/11 上午5:46, Kai Krakow wrote: >>> Am Mon, 10 Jul 2017 19:18:28 +0800 >>> schrieb Coly Li <col...@suse.de>: >>> >>>> If a read bio to cache device gets

Re: raid0 vs. mkfs

2017-06-29 Thread Coly Li
On 2017/6/29 下午11:15, Avi Kivity wrote: > > > On 12/08/2016 06:44 PM, Coly Li wrote: >> On 2016/12/8 上午12:59, Shaohua Li wrote: >>> On Wed, Dec 07, 2016 at 07:50:33PM +0800, Coly Li wrote: >> [snip] >>> Thanks for doing this, Coly! For raid0, this total

Re: [PULL] bcache fixes and updates for-4.13

2017-06-29 Thread Coly Li
. > We need more eyes to look at bcache code, maybe we can always CC bcache patches to linux-block for more review. -- Coly Li

Re: [PATCH 09/19] bcache: update bio->bi_opf bypass/writeback REQ_ flag hints

2017-07-01 Thread Coly Li
On 2017/7/1 上午4:42, bca...@lists.ewheeler.net wrote: > From: Eric Wheeler > > Bypass if: bio->bi_opf & (REQ_RAHEAD|REQ_BACKGROUND) > > Writeback if: op_is_sync(bio->bi_opf) || bio->bi_opf & (REQ_META|REQ_PRIO) > Hi Eric, Could you please explain a bit how the

Re: [PATCH 06/19] bcache: explicitly destory mutex while exiting

2017-07-01 Thread Coly Li
ache_kobj, files) || bch_request_init() || - bch_debug_init(bcache_kobj)) + bch_debug_init(bcache_kobj)) { + mutex_unlock(_register_lock); goto err; + } + mutex_unlock(_register_lock); return 0; err: bcache_exit(); --- Personally I think the first approach with only one new line code added, your original version will add two new lines of code. Just FYI. Thanks. -- Coly Li

Re: [PATCH 01/19] bcache: Fix leak of bdev reference

2017-07-01 Thread Coly Li
er drop the reference returned to > us from lookup_bdev(). Fix that. > > Signed-off-by: Jan Kara <j...@suse.cz> > Cc: sta...@vger.kernel.org Acked-by: Coly Li <col...@suse.de> Thanks. > --- > drivers/md/bcache/super.c | 2 ++ > 1 file changed, 2 insertions(+) &g

Re: [PATCH 03/19] bcache: do not subtract sectors_to_gc for bypassed IO

2017-07-01 Thread Coly Li
t; Reviewed-by: Eric Wheeler <bca...@linux.ewheeler.net> > Cc: sta...@vger.kernel.org Acked-by: Coly Li <col...@suse.de> Thanks. > --- > drivers/md/bcache/request.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/md/bcache/request.

Re: [PATCH 10/19] bcache: initialize stripe_sectors_dirty correctly for thin flash device

2017-07-01 Thread Coly Li
On 2017/7/1 上午4:42, bca...@lists.ewheeler.net wrote: > From: Tang Junhui > > Thin flash device does not initialize stripe_sectors_dirty correctly, this > patch fixes this issue. Hi Junhui, Could you please explain why stripe_sectors_ditry is not correctly initialized

Re: [PATCH 09/19 v2] bcache: update bio->bi_opf bypass/writeback REQ_ flag hints

2017-07-03 Thread Coly Li
io->bi_opf & (REQ_RAHEAD|REQ_BACKGROUND) && !(bio->bi_opf & > REQ_META)) > > Writeback if: > op_is_sync(bio->bi_opf) || bio->bi_opf & (REQ_META|REQ_PRIO) > > Signed-off-by: Eric Wheeler <bca...@linux.ewheeler.net> Review

Re: [PATCH 09/19] bcache: update bio->bi_opf bypass/writeback REQ_ flag hints

2017-07-02 Thread Coly Li
On 2017/7/2 上午3:39, Eric Wheeler wrote: > On Sun, 2 Jul 2017, Coly Li wrote: > >> On 2017/7/1 上午4:42, bca...@lists.ewheeler.net wrote: >>> From: Eric Wheeler <g...@linux.ewheeler.net> >>> >>> Bypass if: bio->bi_opf & (REQ_RAHEAD|REQ_BACKG

Re: [PATCH 09/19 v2] bcache: update bio->bi_opf bypass/writeback REQ_ flag hints

2017-07-06 Thread Coly Li
70246286e94c3 ("block: get rid of bio_rw and READA")' is from you, could you please provide your point on adding REQ_PRIO on the above 2 locations ? IMHO another patch to add REQ_PRIO to gfs2 meta data read ahead code path should be necessary. Thanks. -- Coly Li

[PATCHv2] bcache: option for allow stale data on read failure

2017-09-19 Thread Coly Li
a_on_failure to allow_stale_data_on_failure, and fix the confusing commit log. v1: initial patch posted. Signed-off-by: Coly Li <col...@suse.de> Reported-by: Arne Wolf <aw...@lenovo.com> Cc: Nix <n...@esperi.org.uk> Cc: Kai Krakow <hurikha...@gmail.com> Cc: Eric Wheeler <bca...@lists.

[PATCH] bcache: check ca->alloc_thread initialized before wake up it

2017-09-19 Thread Coly Li
st fix is, before waking up ca->alloc_thread, checking whether it is allocated, and only wake up ca->alloc_thread when it is not NULL. Signed-off-by: Coly Li <col...@suse.de> Reported-by: Jorg Bornschein <j...@capsec.org> Cc: Kent Overstreet <kent.overstr...@gmail.com> Cc: sta..

Re: [PATCHv2] bcache: option for allow stale data on read failure

2017-09-20 Thread Coly Li
On 2017/9/20 下午6:07, Kent Overstreet wrote: > On Wed, Sep 20, 2017 at 06:24:33AM +0800, Coly Li wrote: >> When bcache does read I/Os, for example in writeback or writethrough mode, >> if a read request on cache device is failed, bcache will try to recovery >> the request b

Re: [PATCHv2] bcache: option for allow stale data on read failure

2017-09-20 Thread Coly Li
On 2017/9/20 下午5:40, Michael Lyle wrote: > On Wed, Sep 20, 2017 at 3:28 AM, Coly Li <col...@suse.de> wrote: >> Even the read request failed on file system meta data, because finally a >> stale data will be provided to kernel file system code, it is probably >> file sy

[PATCHv3] bcache: only permit to recovery read error when cache device is clean

2017-09-21 Thread Coly Li
rom allow_stale_data_on_failure to allow_stale_data_on_failure, and fix the confusing commit log. v1: initial patch posted. Signed-off-by: Coly Li <col...@suse.de> Reported-by: Arne Wolf <aw...@lenovo.com> Cc: Kent Overstreet <kent.overstr...@gmail.com> Cc: Michael Lyle <ml

[PATCH] bcache: fix a comments typo in bch_alloc_sectors()

2017-09-21 Thread Coly Li
. Signed-off-by: Coly Li <col...@suse.de> --- drivers/md/bcache/alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/md/bcache/alloc.c b/drivers/md/bcache/alloc.c index cacbe2dbd5c3..071ff28be912 100644 --- a/drivers/md/bcache/alloc.c +++ b/drivers/md/bcache/a

Re: [PATCHv2] bcache: option for allow stale data on read failure

2017-09-20 Thread Coly Li
nel code still thinks everything is consistent on disk .... Thanks. Coly Li > On Tue, Sep 19, 2017 at 3:24 PM, Coly Li <col...@suse.de> wrote: >> When bcache does read I/Os, for example in writeback or writethrough mode, >> if a read request on cache device is failed,

Re: [PATCH 4/5] bcache: writeback: collapse contiguous IO better

2017-10-06 Thread Coly Li
If I use a 1.8T hard disk as cached device, and 1TB SSD as cache device, and set fio to write 500G dirty data in total. Is this configuration close to the working set and cache size you suggested ? [snip] Thanks. -- Coly Li

Re: [PATCH v3 2/5] bcache: implement PI controller for writeback rate

2017-10-07 Thread Coly Li
are retired. > > There is a slight difference from earlier versions of the patch in > integral handling to prevent excessive negative integral windup. > > Signed-off-by: Michael Lyle <ml...@lyle.org> > Reviewed-by: Coly Li <col...@suse.de> Hi Mike, I am testing

Re: [PATCH] bcache: writeback rate shouldn't artifically clamp

2017-10-08 Thread Coly Li
h rates and long sleep periods, but this is adequate for > now. > > Signed-off-by: Michael Lyle <ml...@lyle.org> > Reported-by: Coly Li <col...@suse.de> Added to for-test, I will update test result after the writeback performance test done (hopefully in 2 days). Thanks for fast fix. Coly Li [snip]

Re: [PATCH] bcache: writeback rate shouldn't artifically clamp

2017-10-08 Thread Coly Li
for-test: this directory contains all meaningful patches, I verify them when I have time, they are candidate of for-next. Michael is preparing a git tree at mean time, maybe we will take care patches in form of git tree soon. Thanks. Coly Li > > Excuse my typo sent from my mobile phone. > > A

Re: [PATCH] bcache: rewrite multiple partitions support

2017-10-07 Thread Coly Li
d different naming, but they should be using udev + labels/uuids > anyways. > Yes, I hope so, too. > Reviewed-by: Michael Lyle <ml...@lyle.org> > Thanks for the review. We have one more code reviewer, yeah! Coly Li

Re: [PATCH v3 2/5] bcache: implement PI controller for writeback rate

2017-10-07 Thread Coly Li
On 2017/10/8 下午12:57, Michael Lyle wrote: > Coly-- > > > On 10/07/2017 09:22 PM, Coly Li wrote: > [snip] >> rate:    488.2M/sec >> dirty:    91.7G >> target:    152.3G >> proportional:    -1.5G >> integral:    10.9G >>

Re: [PATCH 4/5] bcache: writeback: collapse contiguous IO better

2017-10-09 Thread Coly Li
move forward. Thanks for your patience, and continuous following up the discussion. -- Coly Li

Re: [PATCH 4/5] bcache: writeback: collapse contiguous IO better

2017-10-05 Thread Coly Li
e I am wrong, but you need to provide more positive performance numbers of more generic workloads as evidence in further discussion. Thanks. -- Coly Li

Re: [PATCH 4/5] bcache: writeback: collapse contiguous IO better

2017-10-05 Thread Coly Li
On 2017/10/6 上午1:53, Michael Lyle wrote: > On Thu, Oct 5, 2017 at 10:38 AM, Coly Li <i...@coly.li> wrote: >> [snip] >> In this test, without bio reorder patches, writeback throughput is >> much faster, you may see the write request number and request merge >> num

Re: [PATCH 4/5] bcache: writeback: collapse contiguous IO better

2017-10-06 Thread Coly Li
1 seconds. They are all dedicated disks for testing, just raw disks without any file system. Thanks. Coly > On Fri, Oct 6, 2017 at 3:36 AM, Coly Li <i...@coly.li> wrote: >> On 2017/10/6 下午5:20, Michael Lyle wrote: >>> Coly-- >>> >>> I did not say the re

Re: [PATCH 4/5] bcache: writeback: collapse contiguous IO better

2017-10-06 Thread Coly Li
e that the bio reorder patches are helpful for general workloads, or at least helpful to many typical workloads. Let the data talk. Thanks. -- Coly Li

Re: [PATCHv3] bcache: only permit to recovery read error when cache device is clean

2017-10-16 Thread Coly Li
On 2017/10/17 上午1:39, Michael Lyle wrote: > Hey Coly-- > > On Thu, Sep 21, 2017 at 12:54 PM, Coly Li <col...@suse.de> wrote: >> When bcache does read I/Os, for example in writeback or writethrough mode, >> if a read request on cache device is failed, bcache will try

[PATCHv4] bcache: only permit to recovery read error when cache device is clean

2017-10-16 Thread Coly Li
sfs file is removed. v2: rename sysfs entry from allow_stale_data_on_failure to allow_stale_data_on_failure, and fix the confusing commit log. v1: initial patch posted. Signed-off-by: Coly Li <col...@suse.de> Reported-by: Arne Wolf <aw...@lenovo.com> Acked-by: Michael Lyle <

Re: [PATCH] bcache: writeback rate clamping: make 32 bit safe

2017-10-16 Thread Coly Li
6 config... sorry too... Reviewed-by: Coly Li <col...@suse.de> Thanks to Michael for the fix. Coly Li > --- > drivers/md/bcache/util.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/md/bcache/util.c b/drivers/md/bcache/util.c

[PATCH 06/12] bcache: correct cache_dirty_target in __update_writeback_rate()

2017-09-06 Thread Coly Li
olumes in __update_writeback_rate(). (Commit log composed by Coly Li to pass checkpatch.pl checking) Signed-off-by: Tang Junhui <tang.jun...@zte.com.cn> Reviewed-by: Coly Li <col...@suse.de> Cc: sta...@vger.kernel.org --- drivers/md/bcache/writeback.c | 3 ++- drivers/md/bcach

[PATCH 04/12] bcache: Don't reinvent the wheel but use existing llist API

2017-09-06 Thread Coly Li
From: Byungchul Park <byungchul.p...@lge.com> Although llist provides proper APIs, they are not used. Make them used. Signed-off-by: Byungchul Park <byungchul.p...@lge.com> Acked-by: Coly Li <col...@suse.de> --- drivers/md/bcache/closure.c | 15 ++- 1 file cha

[PATCH 07/12] bcache: Correct return value for sysfs attach errors

2017-09-06 Thread Coly Li
space behavior. Utilize 1 signed variable to use throughout the function to preserve error return capability. Signed-off-by: Tony Asleson <tasle...@redhat.com> Acked-by: Coly Li <col...@suse.de> Cc: sta...@vger.kernel.org --- drivers/md/bcache/sysfs.c | 4 ++-- 1 file changed, 2 insertio

[PATCH 10/12] bcache: silence static checker warning

2017-09-06 Thread Coly Li
r NULL. Let's just remove the if statement. Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com> Reviewed-by: Coly Li <col...@suse.de> --- drivers/md/bcache/super.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c index 253918972335

[PATCH 08/12] bcache: increase the number of open buckets

2017-09-06 Thread Coly Li
me bucket. Usually the same thread always write/read the same backend device, so it is good for write-back and also promote the usage efficiency of buckets. Signed-off-by: Tang Junhui <tang.jun...@zte.com.cn> Reviewed-by: Coly Li <col...@suse.de> --- drivers/md/bcache/alloc.c | 4 ++

[PATCH 09/12] bcache: fix for gc and write-back race

2017-09-06 Thread Coly Li
e root node write locker This patch alloc a separate work-queue for write-back thread to avoid such race. (Commit log re-organized by Coly Li to pass checkpatch.pl checking) Signed-off-by: Tang Junhui <tang.jun...@zte.com.cn> Acked-by: Coly Li <col...@suse.de> Cc: sta...@vger.kernel.org

[PATCH 05/12] bcache: gc does not work when triggering by manual command

2017-09-06 Thread Coly Li
_to_gc to -1 to meet the condition when we trigger gc by manual command. (Code comments aded by Coly Li) Signed-off-by: Tang Junhui <tang.jun...@zte.com.cn> Reviewed-by: Coly Li <col...@suse.de> --- drivers/md/bcache/sysfs.c | 15 ++- 1 file changed, 14 insertions(+), 1

[PATCH 03/12] bcache: do not subtract sectors_to_gc for bypassed IO

2017-09-06 Thread Coly Li
From: Tang Junhui <tang.jun...@zte.com.cn> Since bypassed IOs use no bucket, so do not subtract sectors_to_gc to trigger gc thread. Signed-off-by: tang.junhui <tang.jun...@zte.com.cn> Acked-by: Coly Li <col...@suse.de> Reviewed-by: Eric Wheeler <bca...@linux.ewheeler.net>

[PATCH 01/12] bcache: Fix leak of bdev reference

2017-09-06 Thread Coly Li
ed-off-by: Jan Kara <j...@suse.cz> Acked-by: Coly Li <col...@suse.de> Cc: sta...@vger.kernel.org --- drivers/md/bcache/super.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c index 8352fad765f6..9a2c190745b6 100644 --- a/drivers/md/bc

[PATCH 00/13] bcache: fixes and update for 4.14

2017-09-06 Thread Coly Li
window. Thanks in advance. Coly Li

Re: [PATCH 01/19] bcache: Fix leak of bdev reference

2017-09-05 Thread Coly Li
On 2017/9/5 下午2:43, Christoph Hellwig wrote: > On Tue, Sep 05, 2017 at 01:30:04AM +0800, Coly Li wrote: >> >> When you mentioned "whole chunk of code", do you mean the following >> block of code ? >> >> >> 1960 if (IS_ERR(b

[PATCH] bcache: option for recovery from staled data

2017-09-09 Thread Coly Li
ease note, because cache mode can be switched arbitrarily in run time, a writethrough mode might be switched from a writeback mode. Therefore checking dc->has_data in writethrough mode still makes sense. Signed-off-by: Coly Li <col...@suse.de> Reported-by: Arne Wolf <aw...@lenovo.com>

[PATCH] bcache: rewrite multiple partitions support

2017-09-09 Thread Coly Li
. For most common deployment for a single server in now days, it should be enough. Signed-off-by: Coly Li <col...@suse.de> --- drivers/md/bcache/super.c | 37 + 1 file changed, 25 insertions(+), 12 deletions(-) diff --git a/drivers/md/bcache/super.c b/d

Re: [PATCH 01/19] bcache: Fix leak of bdev reference

2017-09-05 Thread Coly Li
On 2017/9/5 下午2:43, Christoph Hellwig wrote: > On Tue, Sep 05, 2017 at 01:30:04AM +0800, Coly Li wrote: >> >> When you mentioned "whole chunk of code", do you mean the following >> block of code ? >> >> >> 1960 if (IS_ERR(b

[PATCH 13/13] bcache: initialize dirty stripes in flash_dev_run()

2017-09-06 Thread Coly Li
struct cached_dev *dc); +void bch_sectors_dirty_init(struct bcache_device *); to call this function conveniently in flash_dev_run(). (Commit log is composed by Coly Li) Signed-off-by: Tang Junhui <tang.jun...@zte.com.cn> Reviewed-by: Coly Li <col...@suse.de> Cc: sta...@vger.kernel.org ---

Re: [PATCH 00/13] bcache: fixes and update for 4.14

2017-09-06 Thread Coly Li
On 2017/9/6 下午11:46, Jens Axboe wrote: > On 09/06/2017 09:41 AM, Coly Li wrote: >> On 2017/9/6 下午10:20, Jens Axboe wrote: >>> On Wed, Sep 06 2017, Coly Li wrote: >>>> Hi Jens, >>>> >>>> Here are 12 patchs for bcache fixes and updates, most

Re: [PATCH 1/1] bcache: use llist_for_each_entry_safe() in __closure_wake_up()

2017-09-27 Thread Coly Li
in advance. Coly Li On 2017/9/26 下午5:54, Coly Li wrote: > Commit 09b3efec ("bcache: Don't reinvent the wheel but use existing llist > API") replaces the following while loop by llist_for_each_entry(), > > - > - while (reverse) { > - cl = container_of(r

Re: [PATCH 4/5] bcache: writeback: collapse contiguous IO better

2017-09-28 Thread Coly Li
n posting bcache patches to linux-bcache list, then patches may have more eyes on them. Thanks. Coly Li

Re: [PATCH 4/5] bcache: writeback: collapse contiguous IO better

2017-09-30 Thread Coly Li
rs. > I believe patch 4 is useful on its own, but I have this and other > pieces of development that depend upon it. Current bcache code works well in most of writeback loads, I just worry that implementing an elevator in bcache writeback logic is a big investment with a little return. -- Coly Li

Re: [PATCH 4/5] bcache: writeback: collapse contiguous IO better

2017-09-30 Thread Coly Li
On 2017/9/30 下午3:13, Michael Lyle wrote: > Coly-- > > > On Fri, Sep 29, 2017 at 11:58 PM, Coly Li <i...@coly.li> wrote: >> On 2017/9/30 上午11:17, Michael Lyle wrote: >> [snip] >> >> If writeback_rate is not minimum value, it means there are front end >

Re: [PATCH 4/5] bcache: writeback: collapse contiguous IO better

2017-09-29 Thread Coly Li
arget >>>> rate = 8, it would not combine two adjacent 4k writes and would >>>> instead seek the disk twice. >>>> >>>> This patch imposes limits and explicitly understands the size of >>>> contiguous I/O during issue. It also will combine contiguous I/O >>>> in all circumstances, not just when writeback is requested to be >>>> relatively fast. >>>> >>>> It is a win on its own, but also lays the groundwork for skip writes to >>>> short keys to make the I/O more sequential/contiguous. >>>> >>>> Signed-off-by: Michael Lyle <ml...@lyle.org> [snip code] -- Coly Li

Re: [PATCH 4/5] bcache: writeback: collapse contiguous IO better

2017-09-30 Thread Coly Li
502.00 0.00 19648.00 0 38112 >>> >>> or we are combining about 4.9 extents to a contiguous writeback, and writing >>> back at about half the rate. Hi Mike, Get it. Now I am testing your patches (all 5 patches). It has been 12+ hours, should be 12+ hours more. The backing device is a raid0 composed by 4x1.8T 2.5inch harddisk, cache device is a 3.8T NVMe SSD. Block size is 512K. Hope it works as you expected on my server. -- Coly Li

Re: [PATCH 4/5] bcache: writeback: collapse contiguous IO better

2017-10-01 Thread Coly Li
ess is slower than I expected, tomorrow morning I will get the data. Hope 2 days later I may have an benchmark analysis to share. I will update the result then, if I didn't do anything wrong during my performance testing. Coly Li > On Sat, Sep 30, 2017 at 9:51 PM, Coly Li <i...@coly.li> w

Re: [PATCH 1/1] bcache: use llist_for_each_entry_safe() in __closure_wake_up()

2017-09-27 Thread Coly Li
are right. OK, then let's just > queue it up as-is, I'll add the Fixes line this time. > Hi Jens, Copied, next time for similar situation, Fixes will be there. Thanks for doing this. -- Coly Li

Re: [PATCH 04/12] bcache: Don't reinvent the wheel but use existing llist API

2017-09-26 Thread Coly Li
On 2017/9/26 下午3:16, 박병철/선임연구원/SW Platform(연)AOT팀(byungchul.p...@lge.com) wrote: >> -Original Message- >> From: Coly Li [mailto:i...@coly.li] >> Sent: Tuesday, September 26, 2017 4:09 PM >> To: Michael Lyle; Coly Li >> Cc: linux-bca...@vger.kernel.org; linu

Re: [PATCH 04/12] bcache: Don't reinvent the wheel but use existing llist API

2017-09-26 Thread Coly Li
ch an implicit race behind bcache code. I just post a patch to explain how this race may happen and corrupt the reverse list iteration. Could you please to review the fix ? And thanks to Michael again to catch this bug. -- Coly Li

Re: [PATCH 04/12] bcache: Don't reinvent the wheel but use existing llist API

2017-09-26 Thread Coly Li
On 2017/9/26 下午2:39, 박병철/선임연구원/SW Platform(연)AOT팀(byungchul.p...@lge.com) wrote: >> -Original Message- >> From: Michael Lyle [mailto:ml...@lyle.org] >> Sent: Tuesday, September 26, 2017 1:38 PM >> To: Coly Li >> Cc: linux-bca...@vger.kernel.org; linu

Re: [PATCH 04/12] bcache: Don't reinvent the wheel but use existing llist API

2017-09-26 Thread Coly Li
chance to mislead llist_for_each_entry() to iterate wrong list. llist_for_each_entry_safe() should be used here. I will send a fix to Jens, hope to catch up 4.14 still. Thanks! -- Coly Li

Re: [PATCH 04/12] bcache: Don't reinvent the wheel but use existing llist API

2017-09-26 Thread Coly Li
On 2017/9/26 下午3:15, 박병철/선임연구원/SW Platform(연)AOT팀(byungchul.p...@lge.com) wrote: >> -Original Message- >> From: Coly Li [mailto:i...@coly.li] >> Sent: Tuesday, September 26, 2017 4:09 PM >> To: 박병철/선임연구원/SW Platform(연)AOT팀(byungchul.p...@lge.com); >> Michael

[PATCH 0/1] bcache fix for 4.14-rc4

2017-09-26 Thread Coly Li
Hi Jens, Michael Lyle catches a race bug in bcache 4.14 patch set. Here is the fix for this issue. Could you please to pick it for 4.14-rc4 ? Then we don't need to sta...@vger.kernel.org in next cycle. Thanks in advance. Coly Li

[PATCH 1/1] bcache: use llist_for_each_entry_safe() in __closure_wake_up()

2017-09-26 Thread Coly Li
Then the copy of next node will make sure list iteration stays on original reverse list. Signed-off-by: Coly Li <col...@suse.de> Reported-by: Michael Lyle <ml...@lyle.org> Reviewed-by: Byungchul Park <byungchul.p...@lge.com> --- drivers/md/bcache/closure.c | 4 ++-- 1 file change

Re: [PATCH] [PATCH v3] bcache: gc does not work when triggering by manual

2017-10-10 Thread Coly Li
[root@localhost internal]# echo 1 > trigger_gc But it does not work, I debug the code in gc_should_run(), It works only if in invalidating or sectors_to_gc < 0. So set sectors_to_gc to -1 to meet the condition when we trigger gc by manual command. (Code comments aded by Coly Li

Re: [PATCH 4/5] bcache: writeback: collapse contiguous IO better

2017-10-04 Thread Coly Li
On 2017/10/2 上午1:34, Michael Lyle wrote: > On Sun, Oct 1, 2017 at 10:23 AM, Coly Li <i...@coly.li> wrote: >> Hi Mike, >> >> Your data set is too small. Normally bcache users I talk with, they use >> bcache for distributed storage cluster or commercial data bas

Re: [PATCH 4/5] bcache: writeback: collapse contiguous IO better

2017-10-06 Thread Coly Li
lay the groundwork for further > improvements, through the use of plugging the block layer and to allow > accelerated writeback when the device is idle. > [snip] Hi Mike, Thank you for the detailed information! In your test, dirty data occupies 1/8 space of CACHEDEVICE, can I know exact sizes of the cache device and cached device, then I will set up a similar configuration on my machine, and try to reproduce the test. -- Coly Li

[PATCH] bcache: set task state correctly in allocator_wait()

2017-11-22 Thread Coly Li
mpted out, since its status is TASK_INTERRUPTIBLE, it means scheduler won't pick it back to run forever, and the allocator thread may hang in do_exit(). This patch sets allocator kthread state back to TASK_RUNNING before it returns to do_exit(), which avoids a potential deadlock. Signed-off-by: Coly Li

Re: [PATCH] bcache: set task state correctly in allocator_wait()

2017-11-22 Thread Coly Li
On 22/11/2017 10:55 PM, Sebastian Andrzej Siewior wrote: > On 2017-11-22 15:10:51 [+0100], Hannes Reinecke wrote: >> On 11/22/2017 01:33 PM, Coly Li wrote: >>> Kthread function bch_allocator_thread() references allocator_wait(ca, cond) >>> and when kthread_should_stop()

Re: [PATCH] bio: ensure __bio_clone_fast copies bi_partno

2017-11-17 Thread Coly Li
Pavel Goran <via-bca...@pvgoran.name> > Reported-by: Campbell Steven <caste...@gmail.com> Reviewed-by: Coly Li <col...@suse.de> Coly Li > Cc: Christoph Hellwig <h...@lst.de> > Cc: Jens Axboe <ax...@kernel.dk> > Cc: <sta...@vger.kernel.org> > ---

Re: [PATCH] bcache: recover data from backing device when read request hit clean

2017-11-17 Thread Coly Li
occurred on the layers above any of them. > > On the 3rd server where some read errors occurred, I cannot verify if > there were positive values in cache_read_races as I moved the data from > there onto other storage, and shut down the bcache resources where the > errors occurred. > > If I can provide any other info which might help with this issue, please > let me know. Hi Eddie, This is very informative, thank you so much :-) Coly Li

[RFC] bcache: fix a circular dead locking with dc->writeback_lock and bch_register_lock

2017-11-18 Thread Coly Li
ck_lock, which means a potential better I/O latency for front end I/O requests. Because in writeback mode, front end I/O request also needs to acquire dc->writeback_lock for btree operations. Signed-off-by: Coly Li <col...@suse.de> --- drivers/md/bcache/bcache.h| 2 +- drivers/md/

  1   2   3   4   5   6   >