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

2017-10-07 Thread Michael Lyle
On Tue, Sep 19, 2017 at 3:11 PM, Coly Li wrote: > In bcache code, sysfs entries are created before all resources get > allocated, e.g. allocation thread of a cache set. > > There is posibility for NULL pointer deference if a resource is accessed > but which is not initialized yet.

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

2017-10-07 Thread Coly Li
On 2017/9/28 上午1:41, Michael Lyle wrote: > bcache uses a control system to attempt to keep the amount of dirty data > in cache at a user-configured level, while not responding excessively to > transients and variations in write rate. Previously, the system was a > PD controller; but the output

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

2017-10-07 Thread Michael Lyle
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 change: 0.0k/sec next io:0ms [snip] The backing cached device size is 7.2TB, cache device is 1.4TB, block

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

2017-10-07 Thread Michael Lyle
The previous code artificially limited writeback rate to 100 blocks/second (NSEC_PER_MSEC), which is a rate that can be met on fast hardware. The rate limiting code works fine (though with decreased precision) up to 3 orders of magnitude faster, so use NSEC_PER_SEC. Additionally, ensure that

Re: [PATCH] bcache: rewrite multiple partitions support

2017-10-07 Thread Michael Lyle
Indeed fixes a bug where minors and indices are interchanged on cleanup-- good catch. Factoring out the index conversion is nice. Hopefully no one is adversely affected by the stride change (16->128) and different naming, but they should be using udev + labels/uuids anyways. Reviewed-by:

Re: [PATCH] bcache: rewrite multiple partitions support

2017-10-07 Thread Coly Li
On 2017/10/8 上午5:42, Michael Lyle wrote: > Indeed fixes a bug where minors and indices are interchanged on > cleanup-- good catch. Factoring out the index conversion is nice. > Hi Mike, > Hopefully no one is adversely affected by the stride change (16->128) > and different naming, but they

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 >> change:    0.0k/sec >> next io:    0ms > [snip] > >> The

Re: [PATCH v4] blk-mq: fix nr_requests wrong value when modify it from sysfs

2017-10-07 Thread weiping zhang
On Sat, Sep 30, 2017 at 10:57:31PM +0800, weiping zhang wrote: > On Fri, Sep 22, 2017 at 11:36:28PM +0800, weiping zhang wrote: > > if blk-mq use "none" io scheduler, nr_request get a wrong value when > > input a number > tag_set->queue_depth. blk_mq_tag_update_depth will get > > the smaller one

[PATCH] bfq: Fix bool initialization/comparison

2017-10-07 Thread Thomas Meyer
Bool initializations should use true and false. Bool tests don't need comparisons. Signed-off-by: Thomas Meyer --- diff -u -p a/block/bfq-iosched.c b/block/bfq-iosched.c --- a/block/bfq-iosched.c +++ b/block/bfq-iosched.c @@ -4986,7 +4986,7 @@ static ssize_t