Give a interface to adjust io timeout by device.
Signed-off-by: Weiping Zhang
---
block/blk-sysfs.c | 27 +++
1 file changed, 27 insertions(+)
diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c
index 80eef48fddc8..0cabfb935e71 100644
--- a/block/blk-sysfs.c
+++ b/block
Give a interface to adjust io timeout by device.
Signed-off-by: Weiping Zhang
---
Changes since v1:
* make sure timeout > 0
block/blk-sysfs.c | 27 +++
1 file changed, 27 insertions(+)
diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c
index 80eef48fddc8..90a927514
On Tue, Jan 08, 2019 at 04:57:40PM -0800, Bart Van Assche wrote:
Hi Bart,
Sorry to reply so late.
> On Mon, 2019-01-07 at 20:52 +0800, Weiping Zhang wrote:
> > If the low level driver has no timerout han
Bart Van Assche 于2019年4月2日周二 上午6:41写道:
>
> On Sun, 2019-03-31 at 23:28 +0800, weiping zhang wrote:
> > On Tue, Jan 08, 2019 at 04:57:40PM -0800, Bart Van Assche wrote:
> > > > @@ -942,6 +961,14 @@ int blk_register_queue(struct gendisk *disk)
>
If the low level driver has no timeout handler, the
/sys/block//queue/io_timeout will not be displayed.
Signed-off-by: Weiping Zhang
---
Changes since v1:
* don't call sysfs_remove_group explicitly
* also check q->mq_ops otherwise bug at md driver
[2.094516] internal_create_gr
Bart Van Assche 于2019年4月3日周三 上午1:10写道:
>
> On Tue, 2019-04-02 at 21:14 +0800, Weiping Zhang wrote:
> > [ ... ]
> > -static struct attribute *default_attrs[] = {
> > +static struct attribute *queue_attrs[] = {
> > &queue_requests_entry.at
Hi Jens,
Ping
Bart Van Assche 于2019年4月4日周四 上午12:54写道:
>
> On Tue, 2019-04-02 at 21:14 +0800, Weiping Zhang wrote:
> > If the low level driver has no timeout handler, the
> > /sys/block//queue/io_timeout will not be displayed.
>
> Reviewed-by: Bart Van Assche
>
>
Signed-off-by: Weiping Zhang
---
drivers/block/null_blk.h | 7 +
drivers/block/null_blk_main.c | 294 --
2 files changed, 288 insertions(+), 13 deletions(-)
diff --git a/drivers/block/null_blk.h b/drivers/block/null_blk.h
index 34b22d6523ba
Each block cgroup can select a weighted round robin type to make
its io requests go to the specified haredware queue. Now we support
three round robin type high, medium, low like what nvme specification
donse.
Signed-off-by: Weiping Zhang
---
block/blk-cgroup.c | 88
cgroup.procs
echo `pidof fio2` > /sys/fs/cgroup/blkio/medium/cgroup.procs
echo `pidof fio3` > /sys/fs/cgroup/blkio/low/cgroup.procs
fio1: 260K
fio2: 160K
fio3: 60K
we dispatch 8(high), 4(medium), 1(low) ios at time, to simulate
weighted round robin policy.
Weiping Zhang (2):
block: add weighte
Hi Jens,
It's useful if user want a short timeout when a disk doesn't work normally.
Would you give some comments for this patch,
Thanks a lot
Weiping Zhang 于2018年11月19日周一 下午10:30写道:
>
> Give a interface to adjust io timeout by device.
>
> Signed-off-by: Weiping Zhang
&
Give a interface to adjust io timeout(ms) by device.
Signed-off-by: Weiping Zhang
---
Changes since v2:
* use msecs_to_jiffies and jiffies_to_msecs
Changes since v1:
* make sure timeout > 0
block/blk-sysfs.c | 27 +++
1 file changed, 27 insertions(+)
diff --gi
add documentation for /sys/block//queue/io_timeout
Signed-off-by: Weiping Zhang
---
Documentation/ABI/testing/sysfs-block | 9 +
Documentation/block/queue-sysfs.txt | 6 ++
2 files changed, 15 insertions(+)
diff --git a/Documentation/ABI/testing/sysfs-block
b/Documentation/ABI
add documentation for /sys/block//queue/io_timeout
Signed-off-by: Weiping Zhang
---
Documentation/ABI/testing/sysfs-block | 9 +
Documentation/block/queue-sysfs.txt | 6 ++
2 files changed, 15 insertions(+)
diff --git a/Documentation/ABI/testing/sysfs-block
b/Documentation/ABI
Add documentation for /sys/block//queue/io_timeout.
Signed-off-by: Weiping Zhang
---
Documentation/ABI/testing/sysfs-block | 10 ++
Documentation/block/queue-sysfs.txt | 7 +++
2 files changed, 17 insertions(+)
diff --git a/Documentation/ABI/testing/sysfs-block
b/Documentation
enum blk_eh_timer_return ret;
ret = req->q->mq_ops->timeout(req, reserved);
if (ret == BLK_EH_DONE)
return;
WARN_ON_ONCE(ret != BLK_EH_RESET_TIMER);
}
blk_add_timer(req);
}
> On Wed, Dec 05, 20
Weiping Zhang 于2018年12月5日周三 下午10:49写道:
>
> Christoph Hellwig 于2018年12月5日周三 下午10:40写道:
> >
> > Can you please also send a patch to not show this attribute for
> > drivers without a timeout handler? Thanks!
> >
Is there a simple way do that ?
Shall we return -ENOT
Get rid of BLK_MAX_TIMEOUT, since we want use io_timeout to control
the maximun timeouts of a request, so remove this limitation.
Weiping Zhang (2):
block: get rid of BLK_MAX_TIMEOUT
block: add BLK_DEF_TIMEOUT
block/blk-mq.c | 2 +-
block/blk-timeout.c | 13 +
block/blk.h
Add an obvious definition for default request timeout.
Signed-off-by: Weiping Zhang
---
block/blk-mq.c | 2 +-
block/blk.h| 3 +++
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/block/blk-mq.c b/block/blk-mq.c
index 900550594651..53337d5c37af 100644
--- a/block/blk-mq.c
+++ b
Since io_timeout was added to sysfs, the user can tune timeouts
by that attribute, so kill this limitation.
Signed-off-by: Weiping Zhang
---
block/blk-timeout.c | 13 +
block/blk.h | 4
2 files changed, 1 insertion(+), 16 deletions(-)
diff --git a/block/blk-timeout.c
Bart Van Assche 于2018年12月5日周三 下午11:59写道:
>
> On Wed, 2018-12-05 at 23:37 +0800, Weiping Zhang wrote:
> > @@ -130,7 +119,7 @@ void blk_add_timer(struct request *req)
> >* than an existing one, modify the timer. Round up to next nearest
> >* second.
> &
Bart Van Assche 于2018年12月7日周五 上午12:22写道:
>
> On Wed, 2018-12-05 at 22:17 +0800, Weiping Zhang wrote:
> > +Description:
> > + io_timeout is a request’s timeouts at block layer in
> > + milliseconds. When the underlying driver starts processing
>
Add documentation for /sys/block//queue/io_timeout.
Signed-off-by: Weiping Zhang
---
Documentation/ABI/testing/sysfs-block | 9 +
Documentation/block/queue-sysfs.txt | 7 +++
2 files changed, 16 insertions(+)
diff --git a/Documentation/ABI/testing/sysfs-block
b/Documentation/ABI
If the low level driver has no timerout handler, the
/sys/block//queue/io_timeout will not be displayed.
Signed-off-by: Weiping Zhang
---
block/blk-sysfs.c | 33 +++--
1 file changed, 31 insertions(+), 2 deletions(-)
diff --git a/block/blk-sysfs.c b/block/blk
do cleanup if loop_add fail.
Signed-off-by: weiping zhang
---
drivers/block/loop.c | 30 --
1 file changed, 20 insertions(+), 10 deletions(-)
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index bc8e61506968..9bea70a7da16 100644
--- a/drivers/block/loop.c
this series add error handle for bdi debugfs register flow, the first
three patches try to convert void function to int and do some cleanup
if create dir or file fail.
the fourth patch only add a WARN_ON in device_add_disk, no function change.
weiping zhang (4):
bdi: add check for
this patch add a check for bdi_debug_root and do error handle for it.
we should make sure it was created success, otherwise when add new
block device's bdi folder(eg, 8:0) will be create a debugfs root directory.
Signed-off-by: weiping zhang
---
mm/backing-dev.c | 17 ++---
1
Convert bdi_debug_register to int and then do error handle for it.
Signed-off-by: weiping zhang
---
mm/backing-dev.c | 17 +++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/mm/backing-dev.c b/mm/backing-dev.c
index 5072be19d9b2..e9d6a1ede12b 100644
--- a/mm
In order to make error handle more cleaner we call bdi_debug_register
before set state to WB_registered, that we can avoid call bdi_unregister
in release_bdi().
Signed-off-by: weiping zhang
---
mm/backing-dev.c | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/mm/backing
device_add_disk need do more safety error handle, so this patch just
add WARN_ON.
Signed-off-by: weiping zhang
---
block/genhd.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/block/genhd.c b/block/genhd.c
index dd305c65ffb0..cb55eea821eb 100644
--- a/block/genhd.c
+++ b
On Mon, Oct 30, 2017 at 02:00:28PM +0100, Jan Kara wrote:
> On Fri 27-10-17 01:35:36, weiping zhang wrote:
> > this patch add a check for bdi_debug_root and do error handle for it.
> > we should make sure it was created success, otherwise when add new
> > block device's b
On Mon, Oct 30, 2017 at 02:10:16PM +0100, Jan Kara wrote:
> On Fri 27-10-17 01:36:14, weiping zhang wrote:
> > In order to make error handle more cleaner we call bdi_debug_register
> > before set state to WB_registered, that we can avoid call bdi_unregister
> > in release_b
On Mon, Oct 30, 2017 at 02:14:30PM +0100, Jan Kara wrote:
> On Fri 27-10-17 01:36:42, weiping zhang wrote:
> > device_add_disk need do more safety error handle, so this patch just
> > add WARN_ON.
> >
> > Signed-off-by: weiping zhang
> > ---
> > block/
_owner->bdi_register, this call
stack need more safety cleanup, so patch3 add an WARN_ON.
weiping zhang (3):
bdi: convert bdi_debug_register to int
bdi: add error handle for bdi_debug_register
block: add WARN_ON if bdi register fail
block/genhd.c| 2 +-
mm/backing-dev.c | 22
In order to make error handle more cleaner we call bdi_debug_register
before set state to WB_registered, that we can avoid call bdi_unregister
in release_bdi().
Signed-off-by: weiping zhang
---
mm/backing-dev.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/mm/backing
Convert bdi_debug_register to int and then do error handle for it.
Reviewed-by: Jan Kara
Signed-off-by: weiping zhang
---
mm/backing-dev.c | 17 +++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/mm/backing-dev.c b/mm/backing-dev.c
index 74b52dfd5852..b5f940ce0143
device_add_disk need do more safety error handle, so this patch just
add WARN_ON.
Reviewed-by: Jan Kara
Signed-off-by: weiping zhang
---
block/genhd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/genhd.c b/block/genhd.c
index dd305c65ffb0..52834433878c 100644
--- a
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 min(nr, set->queue_depth), and then q->
Some blkcg policies may not implement all operations in struct blkcg_policy,
there are lots of "if (pol->xxx)", add wrappers for these pol->xxx_fn.
Signed-off-by: weiping zhang
---
block/blk-cgroup.c | 55 +--
include/linux/b
On Wed, Nov 01, 2017 at 02:47:22PM +0100, Jan Kara wrote:
> On Tue 31-10-17 18:38:24, weiping zhang wrote:
> > In order to make error handle more cleaner we call bdi_debug_register
> > before set state to WB_registered, that we can avoid call bdi_unregister
> > in release_b
Hi Jens,
several cleanup for blk-wbt, no function change, thanks
weiping zhang (5):
blk-wbt: remove duplicated setting in wbt_init
blk-wbt: cleanup comments to one line
blk-sysfs: remove NULL pointer checking in queue_wb_lat_store
blk-wbt: move wbt_clear_stat to common place in wbt_done
rwb->wc and rwb->queue_depth were overwritten by wbt_set_write_cache and
wbt_set_queue_depth, remove the default setting.
Signed-off-by: weiping zhang
---
block/blk-wbt.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/block/blk-wbt.c b/block/blk-wbt.c
index e59d59c..edb09e93 100644
wbt_init doesn't set q->rq_wb to NULL, if wbt_init return 0,
so check return value is enough, remove NULL checking.
Signed-off-by: weiping zhang
---
block/blk-sysfs.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c
index
Signed-off-by: weiping zhang
---
block/blk-wbt.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/block/blk-wbt.c b/block/blk-wbt.c
index edb09e93..0fb65f0 100644
--- a/block/blk-wbt.c
+++ b/block/blk-wbt.c
@@ -729,9 +729,7 @@ int wbt_init(struct request_queue *q
wbt_done call wbt_clear_stat no matter current stat was tracked
or not, move it to common place.
Signed-off-by: weiping zhang
---
block/blk-wbt.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/block/blk-wbt.c b/block/blk-wbt.c
index 0fb65f0..cd9a20a 100644
--- a/block/blk
Signed-off-by: weiping zhang
---
block/blk-wbt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/blk-wbt.c b/block/blk-wbt.c
index cd9a20a..9f4ef9c 100644
--- a/block/blk-wbt.c
+++ b/block/blk-wbt.c
@@ -481,7 +481,7 @@ static inline unsigned int get_limit(struct rq_wb
export these two interface for cgroup-v1.
Signed-off-by: weiping zhang
---
block/blk-throttle.c | 10 ++
1 file changed, 10 insertions(+)
diff --git a/block/blk-throttle.c b/block/blk-throttle.c
index 96ad326..1d7637f 100644
--- a/block/blk-throttle.c
+++ b/block/blk-throttle.c
export these two interface for cgroup-v1.
Signed-off-by: weiping zhang
---
block/blk-throttle.c | 10 ++
1 file changed, 10 insertions(+)
diff --git a/block/blk-throttle.c b/block/blk-throttle.c
index 96ad326..1d7637f 100644
--- a/block/blk-throttle.c
+++ b/block/blk-throttle.c
ebug patch, I add some debug log, no function
change, thanks.
>From d2728c07589e8b83115a51e0c629451bff7308db Mon Sep 17 00:00:00 2001
From: weiping zhang
Date: Thu, 14 Dec 2017 17:56:22 +0800
Subject: [PATCH] bdi debugfs
Signed-off-by: weiping zhang
---
mm/backing-dev.c | 28 ++
2017-12-14 23:41 GMT+08:00 Bruno Wolff III :
> On Thu, Dec 14, 2017 at 18:09:27 +0800,
> weiping zhang wrote:
>>
>>
>> It seems something wrong with bdi debugfs register, could you help
>> test the forllowing debug patch, I add some debug log, no function
>>
2017-12-15 9:44 GMT+08:00 Bruno Wolff III :
> On Fri, Dec 15, 2017 at 09:22:21 +0800,
> weiping zhang wrote:
>>
>>
>> Thanks your testing, but I cann't find WARN_ON in device_add_disk from
>> this boot1.log, could you help reproduce that issue? And does this is
2017-12-15 19:10 GMT+08:00 Bruno Wolff III :
> On Fri, Dec 15, 2017 at 10:04:32 +0800,
> weiping zhang wrote:
>>
>> I just want to know WARN_ON WHAT in device_add_disk,
>> if bdi_register_owner return error code, it may fail at any step of
>> following:
>
>
&g
2017-12-17 0:32 GMT+08:00 Bruno Wolff III :
> On Fri, Dec 15, 2017 at 13:51:22 -0600,
> Bruno Wolff III wrote:
>>
>>
>> I do not know what is different. Do you have any ideas? Most likely I
>> won't be able to test any more kernels until Monday (unless I can use most
>> of my most recent build ov
2017-12-21 21:00 GMT+08:00 Bruno Wolff III :
> After today, I won't have physical access to the problem machine until
> January 2nd. So if you guys have any testing suggestions I need them soon if
> they are to get done before my vacation.
> I do plan to try booting to level 1 to see if I can get a
2017-12-21 23:18 GMT+08:00 Bruno Wolff III :
> On Thu, Dec 21, 2017 at 22:01:33 +0800,
> weiping zhang wrote:
>>
>> Hi,
>> how do you do bisect ?build all kernel commit one by one ?
>> as you did before:
>> https://bugzilla.redhat.com/show_bug.cgi?id=1520982
&
2017-12-21 23:36 GMT+08:00 Bruno Wolff III :
> On Thu, Dec 21, 2017 at 23:31:40 +0800,
> weiping zhang wrote:
>>
>> does every time boot fail can trigger WANRING in device_add_disk ?
>
>
> Not that I see. But the message could scroll off the screen. The boot gets
>
2017-12-22 1:02 GMT+08:00 Jens Axboe :
> On 12/21/17 9:42 AM, Bruno Wolff III wrote:
>> On Thu, Dec 21, 2017 at 23:48:19 +0800,
>> weiping zhang wrote:
>>>> output you want. I never saw it for any kernels I compiled myself. Only
>>>> when
>>
2017-12-22 12:53 GMT+08:00 Bruno Wolff III :
> On Thu, Dec 21, 2017 at 17:16:03 -0600,
> Bruno Wolff III wrote:
>>
>>
>> Enforcing mode alone isn't enough as I tested that one one machine at home
>> and it didn't trigger the problem. I'll try another machine late tonight.
>
>
> I got the problem
On Fri, Dec 22, 2017 at 08:04:23AM -0600, Bruno Wolff III wrote:
> On Fri, Dec 22, 2017 at 21:20:10 +0800,
> weiping zhang wrote:
> >2017-12-22 12:53 GMT+08:00 Bruno Wolff III :
> >>On Thu, Dec 21, 2017 at 17:16:03 -0600,
> >> Bruno Wolff III wrote:
> >>
On Fri, Dec 22, 2017 at 08:04:23AM -0600, Bruno Wolff III wrote:
> On Fri, Dec 22, 2017 at 21:20:10 +0800,
> weiping zhang wrote:
> >2017-12-22 12:53 GMT+08:00 Bruno Wolff III :
> >>On Thu, Dec 21, 2017 at 17:16:03 -0600,
> >> Bruno Wolff III wrote:
> >>
2017-12-11 23:17 GMT+08:00 Tejun Heo :
> On Mon, Dec 11, 2017 at 10:56:25PM +0800, weiping zhang wrote:
>> export these two interface for cgroup-v1.
>>
>> Signed-off-by: weiping zhang
>
> Acked-by: Tejun Heo
>
> Thanks.
>
Hi Jens,
these two interface are use
bdi debugfs dir/file may create fail, add error log here.
Signed-off-by: weiping zhang
---
mm/backing-dev.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/mm/backing-dev.c b/mm/backing-dev.c
index b5f940c..9117c21 100644
--- a/mm/backing-dev.c
+++ b/mm/backing-dev.c
2018-01-11 0:10 GMT+08:00 Bart Van Assche :
> On Wed, 2018-01-10 at 23:18 +0800, weiping zhang wrote:
>> bdi debugfs dir/file may create fail, add error log here.
>>
>> Signed-off-by: weiping zhang
>> ---
>> mm/backing-dev.c | 3 ++-
>> 1 file changed, 2
bdi debugfs dir/file may create fail, add error log here.
Signed-off-by: weiping zhang
---
V1->V2:
fix indentation and make log message more clear
mm/backing-dev.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/mm/backing-dev.c b/mm/backing-dev.c
index b5f940c..0a49
add a check before allocate resource for blk_trace, if it's in use.
Signed-off-by: weiping zhang
---
kernel/trace/blktrace.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c
index 987d9a9a..16c 100644
--- a/kernel/trace/blktr
2017-12-11 23:17 GMT+08:00 Tejun Heo :
> On Mon, Dec 11, 2017 at 10:56:25PM +0800, weiping zhang wrote:
>> export these two interface for cgroup-v1.
>>
>> Signed-off-by: weiping zhang
>
> Acked-by: Tejun Heo
>
Hi Jens,
Have you got time to check this patch ?
Thanks
> Thanks.
>
> --
> tejun
2018-01-11 0:36 GMT+08:00 weiping zhang :
> bdi debugfs dir/file may create fail, add error log here.
>
> Signed-off-by: weiping zhang
> ---
> V1->V2:
> fix indentation and make log message more clear
>
> mm/backing-dev.c | 4 +++-
> 1 file changed, 3 insertions(+)
use queue_is_rq_based instead of open code.
Signed-off-by: weiping zhang
---
block/blk-throttle.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/blk-throttle.c b/block/blk-throttle.c
index 96ad326..457e985 100644
--- a/block/blk-throttle.c
+++ b/block/blk-throttle.c
use queue_is_rq_based instead of open code.
Signed-off-by: weiping zhang
---
block/blk-throttle.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/blk-throttle.c b/block/blk-throttle.c
index e136f5e..c475f0f 100644
--- a/block/blk-throttle.c
+++ b/block/blk-throttle.c
2018-01-20 3:58 GMT+08:00 Jens Axboe :
> On 1/19/18 10:40 AM, weiping zhang wrote:
>> use queue_is_rq_based instead of open code.
>>
>> Signed-off-by: weiping zhang
>> ---
>> block/blk-throttle.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
&g
2018-01-20 3:54 GMT+08:00 Jens Axboe :
> On 1/19/18 10:36 AM, weiping zhang wrote:
>> 2018-01-11 0:36 GMT+08:00 weiping zhang :
>>> bdi debugfs dir/file may create fail, add error log here.
>>>
>>> Signed-off-by: weiping zhang
>>> ---
>>>
show io queue depth.
Signed-off-by: weiping zhang
---
block/blk-sysfs.c | 11 +++
include/linux/blkdev.h | 5 +
2 files changed, 16 insertions(+)
diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c
index 27aceab..66cba2b 100644
--- a/block/blk-sysfs.c
+++ b/block/blk-sysfs.c
A mapping show as following:
hctxcpus
hctx0 0 1
hctx1 2
hctx2 3
hctx3 4 5
Signed-off-by: weiping zhang
---
block/blk-mq-debugfs.c | 18 ++
1 file changed, 18 insertions(+)
diff --git a/block/blk-mq-debugfs.c b
On Wed, Jul 12, 2017 at 10:57:37AM -0600, Jens Axboe wrote:
> On 07/12/2017 10:54 AM, weiping zhang wrote:
> > A mapping show as following:
> >
> > hctxcpus
> > hctx0 0 1
> > hctx1 2
> > hctx2
On Wed, Jul 12, 2017 at 11:25:12AM -0600, Jens Axboe wrote:
> On 07/12/2017 11:13 AM, weiping zhang wrote:
> > On Wed, Jul 12, 2017 at 10:57:37AM -0600, Jens Axboe wrote:
> >> On 07/12/2017 10:54 AM, weiping zhang wrote:
> >>> A mapping show as following:
>
one hw queue only has one hctx, reduce it's number same as nr_hw_queues.
Signed-off-by: weiping zhang
---
block/blk-mq.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/block/blk-mq.c b/block/blk-mq.c
index 05dfa3f..8c98f59 100644
--- a/block/blk-mq.c
+++ b/bloc
On Thu, Jul 13, 2017 at 10:14:31AM -0600, Jens Axboe wrote:
> On 07/13/2017 10:10 AM, weiping zhang wrote:
> > one hw queue only has one hctx, reduce it's number same as nr_hw_queues.
>
> What happens if a device registers with eg 4 hw queues, then later
> calls blk
set submit_queues to 1 by default, and make sure it's value > 0.
Signed-off-by: weiping zhang
---
drivers/block/null_blk.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/block/null_blk.c b/drivers/block/null_blk.c
index 72e2bc5..f1d0ca0 100644
--- a
r what user want, otherwise kmalloc has a negtive parameters.
weiping zhang (2):
null_blk: simplify logic for use_per_node_hctx
null_blk: make sure submit_queues > 0
drivers/block/null_blk.c | 11 ---
1 file changed, 4 insertions(+), 7 deletions(-)
--
2.9.4
make sure submit_queues equal nr_online_nodes.
Signed-off-by: weiping zhang
---
drivers/block/null_blk.c | 7 ++-
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/block/null_blk.c b/drivers/block/null_blk.c
index 85c24ca..72e2bc5 100644
--- a/drivers/block/null_blk.c
On Thu, Aug 03, 2017 at 12:26:00AM +0800, weiping zhang wrote:
> Hi,
>
> two misc patch for null_blk,
>
> null_blk: simplify logic for use_per_node_hctx
> simplify code logic, if use_per_node_hctx set submit_queues same as
> nr_online_nodes.
>
> null_blk: make s
show max io queue depth, it may doesn't reflect the real hardware's
max queue depth which was reduced by some software designs.
Signed-off-by: weiping zhang
---
block/blk-sysfs.c | 11 +++
include/linux/blkdev.h | 5 +
2 files changed, 16 insertions(+)
diff --git a
put_device(pdev) will call pdev->type->release finally, and blk_free_devt
has been called in part_release(), so remove it.
Signed-off-by: weiping zhang
---
block/partition-generic.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/block/partition-generic.c b/block/partition-generic.c
if elv_register fail, bfq_pool should be free.
Signed-off-by: weiping zhang
---
block/bfq-iosched.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c
index 436b6ca..bdb072f 100644
--- a/block/bfq-iosched.c
+++ b/block/bfq-iosched.c
if alloc memory fail, all cpds which were allocated before should be cleaned up.
Signed-off-by: weiping zhang
---
block/blk-cgroup.c | 11 +++
1 file changed, 11 insertions(+)
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c
index 0480892..7e21c4b 100644
--- a/block/blk-cgroup.c
On Sat, Aug 19, 2017 at 12:37:20AM +0800, weiping zhang wrote:
> if elv_register fail, bfq_pool should be free.
>
> Signed-off-by: weiping zhang
> ---
> block/bfq-iosched.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/block/bfq-iosched
> 在 2017年8月24日,05:35,Jens Axboe 写道:
>
> On 08/18/2017 10:37 AM, weiping zhang wrote:
>> if elv_register fail, bfq_pool should be free.
>
> Looks correct to me, I'll add it. Thanks.
>
> --
> Jens Axboe
>
Jens,
Thanks a lot
On Fri, Aug 18, 2017 at 11:54:45PM +0800, weiping zhang wrote:
> put_device(pdev) will call pdev->type->release finally, and blk_free_devt
> has been called in part_release(), so remove it.
>
> Signed-off-by: weiping zhang
> ---
> block/partition-generic.c | 1 -
>
The last parameter "count" never be used in xxx_var_store,
convert these functions to void.
Signed-off-by: weiping zhang
---
block/bfq-iosched.c | 33 +
block/cfq-iosched.c | 13 ++---
block/deadline-iosched.c | 9 -
block/mq-
this patch fix two errors, firstly avoid kfree blk_root, secondly not
free(blkcg) ,if blkcg alloc fail(blkcg == NULL), just unlock that mutex;
Signed-off-by: weiping zhang
---
block/blk-cgroup.c | 8 +---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/block/blk-cgroup.c b
On Fri, Aug 25, 2017 at 01:11:33AM +0800, weiping zhang wrote:
> The last parameter "count" never be used in xxx_var_store,
> convert these functions to void.
>
> Signed-off-by: weiping zhang
> ---
> block/bfq-iosched.c | 33 +---
On Mon, Aug 28, 2017 at 10:00:46AM -0600, Jens Axboe wrote:
> On 08/28/2017 06:22 AM, weiping zhang wrote:
> > On Fri, Aug 25, 2017 at 01:11:33AM +0800, weiping zhang wrote:
> >> The last parameter "count" never be used in xxx_var_store,
> >> convert these func
check pol->cpd_free_fn() instead of pol->cpd_alloc_fn() when free cpd.
Signed-off-by: weiping zhang
---
block/blk-cgroup.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c
index 0480892..adcbc3e 100644
--- a/block/blk-cg
The first patch is the V2 of [PATCH] blkcg: check pol->cpd_free_fn
before free cpd, it fixs a checking before free cpd.
The second patch add some wrappers for struct blkcg_policy->xxx_fn, because not
every block cgroup policy implement all operations.
weiping zhang (2):
blkcg: che
check pol->cpd_free_fn() instead of pol->cpd_alloc_fn() when free cpd.
Signed-off-by: weiping zhang
---
block/blk-cgroup.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c
index 0480892..0c45870 100644
--- a/block/blk-cgroup.c
Some blkcg policies may not implement all operations in struct blkcg_policy,
add wrappers for these pol->xxx_fn.
Signed-off-by: weiping zhang
---
block/blk-cgroup.c | 53 --
include/linux/blk-cgroup.h | 72 ++
2017-09-02 1:14 GMT+08:00 Paolo Valente :
>
>> Il giorno 30 ago 2017, alle ore 20:42, Bart Van Assche
>> ha scritto:
>>
>> Make sysfs writes fail for invalid numbers instead of storing
>> uninitialized data copied from the stack. This patch removes
>> all uninitialized_var() occurrences from the
> Sorry but I do not like this proposal because:
> * If invalid input is provided writing into a sysfs attribute should fail
> instead of ignoring the invalid input silently.
> * simple_strtoul() is considered obsolete and must not be used in new code.
> From include/linux/kernel.h:
>
> /* Obso
n1/queue/ioscheduler
echo 100 > /sys/block/nvme0n1/queue/nr_requests
cat /sys/block/nvme0n1/queue/nr_requests
1000000
Signed-off-by: weiping zhang
---
block/blk-mq.c | 7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/block/blk-mq.c b/block/blk-mq.c
index f84d145..8303e5e
On Tue, Sep 05, 2017 at 03:42:45PM +, Bart Van Assche wrote:
> On Sun, 2017-09-03 at 21:46 +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
1 - 100 of 155 matches
Mail list logo