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

2017-09-12 Thread weiping zhang
On Wed, Sep 06, 2017 at 01:00:44PM +, Bart Van Assche wrote: > On Wed, 2017-09-06 at 15:34 +0800, weiping zhang wrote: > > 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

Re: [PATCH v2 0/2] Add wrapper for blkcg policy operatins

2017-09-15 Thread weiping zhang
On Fri, Sep 01, 2017 at 10:16:45PM +0800, weiping zhang wrote: > 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

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

2017-09-21 Thread weiping zhang
On Tue, Sep 12, 2017 at 09:57:32PM +0800, weiping zhang wrote: > On Wed, Sep 06, 2017 at 01:00:44PM +, Bart Van Assche wrote: > > On Wed, 2017-09-06 at 15:34 +0800, weiping zhang wrote: > > > On Tue, Sep 05, 2017 at 03:42:45PM +, Bart Van Assche wrote: > > > &g

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

2017-09-21 Thread weiping zhang
On Thu, Sep 21, 2017 at 08:09:47AM -0600, Jens Axboe wrote: > On 09/21/2017 07:03 AM, weiping zhang wrote: > > On Tue, Sep 12, 2017 at 09:57:32PM +0800, weiping zhang wrote: > >> On Wed, Sep 06, 2017 at 01:00:44PM +, Bart Van Assche wrote: > >>> On Wed, 2017-09-06

[PATCH v2 2/2] blk-sysfs: return EINVAL when user modify nr_request less than BLKDEV_MIN_RQ

2017-09-21 Thread weiping zhang
Signed-off-by: weiping zhang --- block/blk-sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c index b8362c0..03a6e19 100644 --- a/block/blk-sysfs.c +++ b/block/blk-sysfs.c @@ -75,7 +75,7 @@ queue_requests_store(struct request_queue

[PATCH v2 1/2] blk-mq: fix nr_requests wrong value when modify it from sysfs

2017-09-21 Thread weiping zhang
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 | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/block/blk-mq.c b/block/blk-mq.c index 98a1860..479c35a

[PATCH v2 0/2] fix wrong value when user modify nr_request by sysfs

2017-09-21 Thread weiping zhang
behavior with former patch, also return EINVAL when user write a value less than BLKDEV_MIN_RQ weiping zhang (2): blk-mq: fix nr_requests wrong value when modify it from sysfs blk-sysfs: return EINVAL when user modify nr_request less than BLKDEV_MIN_RQ block/blk-mq.c| 8 ++-- b

Re: [PATCH v2 2/2] blk-sysfs: return EINVAL when user modify nr_request less than BLKDEV_MIN_RQ

2017-09-21 Thread weiping zhang
On Thu, Sep 21, 2017 at 10:38:22AM -0600, Jens Axboe wrote: > On 09/21/2017 09:17 AM, weiping zhang wrote: > > Signed-off-by: weiping zhang > > --- > > block/blk-sysfs.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git

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

2017-09-21 Thread weiping zhang
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 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/block/blk-mq.c b/block/blk-mq.c index 98a1860..491e336 10064

Re: [PATCH v2 1/2] blk-mq: fix nr_requests wrong value when modify it from sysfs

2017-09-21 Thread weiping zhang
On Thu, Sep 21, 2017 at 10:37:48AM -0600, Jens Axboe wrote: > On 09/21/2017 09:17 AM, 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

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

2017-09-22 Thread weiping zhang
ue/scheduler echo 100 > /sys/block/nvme0n1/queue/nr_requests cat /sys/block/nvme0n1/queue/nr_requests 1000000 Signed-off-by: weiping zhang --- Changes since v4: * fix typo in commit message(queue/ioscheduler => queue/scheduler) Changes since v3: * remove compare n

[PATCH] null_blk: add "no_sched" module parameter

2017-09-29 Thread weiping zhang
add an option that disable io scheduler for null block device. Signed-off-by: weiping zhang --- drivers/block/null_blk.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/block/null_blk.c b/drivers/block/null_blk.c index bd92286..3c63863 100644 --- a/drivers/block

Re: [PATCH] null_blk: add "no_sched" module parameter

2017-09-29 Thread weiping zhang
On Fri, Sep 29, 2017 at 11:39:03PM +0200, Jens Axboe wrote: > On 09/29/2017 07:09 PM, weiping zhang wrote: > > add an option that disable io scheduler for null block device. > > > > Signed-off-by: weiping zhang > > --- > > drivers/block/null_blk.c | 6 +-

[PATCH v2] null_blk: add "no_sched" module parameter

2017-09-29 Thread weiping zhang
add an option that disable io scheduler for null block device. Signed-off-by: weiping zhang --- drivers/block/null_blk.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/block/null_blk.c b/drivers/block/null_blk.c index bd92286..38f4a8c 100644 --- a/drivers/block/null_blk.c

[PATCH] blk-mq: remove unused function hctx_allow_merges

2017-09-30 Thread weiping zhang
since 9bddeb2a5b981 "blk-mq: make per-sw-queue bio merge as default .bio_merge" there is no caller for this function. Signed-off-by: weiping zhang --- block/blk-mq.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/block/blk-mq.c b/block/blk-mq.c index f84d145..520d257 10

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

2017-09-30 Thread weiping zhang
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->

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_dep

[PATCH] blkcg: check pol->cpd_free_fn before free cpd

2017-10-10 Thread weiping zhang
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 d3f56ba..e7ec676 100644 --- a/block/blk-cgroup.c

Re: [PATCH] blkcg: check pol->cpd_free_fn before free cpd

2017-10-10 Thread weiping zhang
On Tue, Oct 10, 2017 at 09:04:39AM -0600, Jens Axboe wrote: > On 10/10/2017 08:53 AM, weiping zhang wrote: > > check pol->cpd_free_fn() instead of pol->cpd_alloc_fn() when free cpd. > > In practice this shouldn't make a difference, since if you have an > alloc_fn, y

[PATCH] blkcg: add sanity check for blkcg policy operations

2017-10-10 Thread weiping zhang
blkcg policy should keep cpd/pd's alloc_fn and free_fn in pairs, otherwise policy would register fail. Signed-off-by: weiping zhang --- block/blk-cgroup.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c index e7ec676..55

Re: [PATCH V2 3/3] blockcg: export latency info for each cgroup

2017-10-10 Thread weiping zhang
On Fri, Oct 06, 2017 at 05:56:01PM -0700, Shaohua Li wrote: > From: Shaohua Li > > Export the latency info to user. The latency is a good sign to indicate > if IO is congested or not. User can use the info to make decisions like > adjust cgroup settings. Hi Shaohua, How to check IO congested or n

Re: [PATCH] blkcg: add sanity check for blkcg policy operations

2017-10-11 Thread weiping zhang
On Wed, Oct 11, 2017 at 09:58:33AM +0200, Johannes Thumshirn wrote: > On Wed, Oct 11, 2017 at 12:00:55AM +0800, weiping zhang wrote: > > + * blkcg_policy_check_ops - check policy's operations > > + * @pol: blkcg policy to check > > + * > > + * Make sure cpd/pd_allo

[PATCH v2] blkcg: add sanity check for blkcg policy operations

2017-10-11 Thread weiping zhang
blkcg policy should keep cpd/pd's alloc_fn and free_fn in pairs, otherwise policy would register fail. Signed-off-by: weiping zhang --- block/blk-cgroup.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c index e7ec676..67b01c5 100644

Re: [PATCH V2 3/3] blockcg: export latency info for each cgroup

2017-10-11 Thread weiping zhang
2017-10-11 2:23 GMT+08:00 Shaohua Li : > On Wed, Oct 11, 2017 at 01:35:51AM +0800, weiping zhang wrote: >> On Fri, Oct 06, 2017 at 05:56:01PM -0700, Shaohua Li wrote: >> > From: Shaohua Li >> > >> > Export the latency info to user. The latency is a good sign to

Re: [PATCH v2] blkcg: add sanity check for blkcg policy operations

2017-10-11 Thread weiping zhang
On Wed, Oct 11, 2017 at 10:51:32AM -0600, Jens Axboe wrote: > On 10/11/2017 03:46 AM, weiping zhang wrote: > > blkcg policy should keep cpd/pd's alloc_fn and free_fn in pairs, > > otherwise policy would register fail. > > > > Signed-off-by: weiping zhang >

[PATCH v3] blkcg: add sanity check for blkcg policy operations

2017-10-11 Thread weiping zhang
blkcg policy should keep cpd/pd's alloc_fn and free_fn in pairs, otherwise policy would register fail. Signed-off-by: weiping zhang --- block/blk-cgroup.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c index e7ec676..6c5f5f3 100644 --- a/

[PATCH 0/2] Update the usage hints of submit_queues and

2017-10-13 Thread weiping zhang
usage hints for no_sched. weiping zhang (2): null_blk: update usage hints for submit_queues null_blk: add usage hints for no_sched Documentation/block/null_blk.txt | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) -- 2.14.2

[PATCH 1/2] null_blk: update usage hints for submit_queues

2017-10-13 Thread weiping zhang
update the range of submits_queues, and correct usage hints. Signed-off-by: weiping zhang --- Documentation/block/null_blk.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Documentation/block/null_blk.txt b/Documentation/block/null_blk.txt index 3140dbd860d8

[PATCH 2/2] null_blk: add usage hints for no_sched

2017-10-13 Thread weiping zhang
This parameter provide an option to disable io scheduler when nullb* in multi-queue mode. Signed-off-by: weiping zhang --- Documentation/block/null_blk.txt | 4 1 file changed, 4 insertions(+) diff --git a/Documentation/block/null_blk.txt b/Documentation/block/null_blk.txt index

[PATCH v4] blkcg: add sanity check for blkcg policy operations

2017-10-17 Thread weiping zhang
blkcg policy should keep cpd/pd's alloc_fn and free_fn in pairs, otherwise policy would register fail. Reviewed-by: Johannes Thumshirn Signed-off-by: weiping zhang --- Changes since V4: * merge "if(cpd->xxx)" and "if(pd->xxx)" together Changes since V3: * make

[RFC PATCH 2/2] virtio_blk: add new module parameter to set max request size

2018-04-05 Thread Weiping Zhang
Actually there is no upper limitation, so add new module parameter to provide a way to set a proper max request size for virtio block. Using a larger request size can improve sequence performance in theory, and reduce the interaction between guest and hypervisor. Signed-off-by: Weiping Zhang

[RFC PATCH 0/2] use larger max_request_size for virtio_blk

2018-04-05 Thread Weiping Zhang
elper blk_queue_max_hw_sectors_no_limit to set a proper max reqeust size. Weiping Zhang (2): blk-setting: add new helper blk_queue_max_hw_sectors_no_limit virtio_blk: add new module parameter to set max request size block/blk-settings.c | 20 drivers/block/virtio_blk.c

[RFC PATCH 1/2] blk-setting: add new helper blk_queue_max_hw_sectors_no_limit

2018-04-05 Thread Weiping Zhang
There is a default upper limitation BLK_DEF_MAX_SECTORS, but for some virtual block device driver there is no such limitation. So add a new help to set max request size. Signed-off-by: Weiping Zhang --- block/blk-settings.c | 20 include/linux/blkdev.h | 2 ++ 2 files

Re: [RFC PATCH 0/2] use larger max_request_size for virtio_blk

2018-04-07 Thread Weiping Zhang
2018-04-05 22:29 GMT+08:00 Jens Axboe : > On 4/5/18 4:09 AM, Weiping Zhang wrote: >> Hi, >> >> For virtio block device, actually there is no a hard limit for max request >> size, and virtio_blk driver set -1 to blk_queue_max_hw_sectors(q, -1U);. >> But it doesn&#

[PATCH v2 1/4] block: add weighted round robin for blkcgroup

2019-06-16 Thread Weiping Zhang
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

[RFC PATCH v2 0/4] blkcg: add support weighted round robin tagset map

2019-06-16 Thread Weiping Zhang
order HCTX_TYPE_POLL to the last one to adopt nvme driver easily. * add support WRR(Weighted Round Robin) for nvme driver Weiping Zhang (4): block: add weighted round robin for blkcgroup null_blk: add support weighted round robin submition queue genirq/affinity: allow driver's discontigou

[PATCH v2 2/4] null_blk: add support weighted round robin submition queue

2019-06-16 Thread Weiping Zhang
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

[PATCH v2 3/4] genirq/affinity: allow driver's discontigous affinity set

2019-06-16 Thread Weiping Zhang
The driver may implement multiple affinity set, and some of are empty, for this case we just skip them. Signed-off-by: Weiping Zhang --- kernel/irq/affinity.c | 4 1 file changed, 4 insertions(+) diff --git a/kernel/irq/affinity.c b/kernel/irq/affinity.c index f18cd5aa33e8..6d964fe0fbd8

[PATCH v2 4/4] nvme: add support weighted round robin queue

2019-06-16 Thread Weiping Zhang
for write/flush, if blkcg's wrr is none and is not poll for read, default and poll those submission queue's priority is medium by default; Signed-off-by: Weiping Zhang --- drivers/nvme/host/pci.c | 195 +- include/linux/interrupt.h |

Re: [PATCH v2 4/4] nvme: add support weighted round robin queue

2019-06-21 Thread Weiping Zhang
Hi Minwoo, Thanks your feedback. Minwoo Im 于2019年6月20日周四 下午10:17写道: > > > -static int write_queues; > > -module_param_cb(write_queues, &queue_count_ops, &write_queues, 0644); > > -MODULE_PARM_DESC(write_queues, > > - "Number of queues to use for writes. If not set, reads and writes " > > +st

[PATCH v3 2/5] nvme: add get_ams for nvme_ctrl_ops

2019-06-24 Thread Weiping Zhang
The get_ams() will return the AMS(Arbitration Mechanism Selected) from the driver. Signed-off-by: Weiping Zhang --- drivers/nvme/host/core.c | 9 - drivers/nvme/host/nvme.h | 1 + drivers/nvme/host/pci.c | 6 ++ include/linux/nvme.h | 1 + 4 files changed, 16 insertions(+), 1

[PATCH v3 3/5] nvme-pci: rename module parameter write_queues to read_queues

2019-06-24 Thread Weiping Zhang
-off-by: Weiping Zhang --- drivers/nvme/host/pci.c | 22 ++ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c index 5d84241f0214..a3c9bb72d90e 100644 --- a/drivers/nvme/host/pci.c +++ b/drivers/nvme/host/pci.c

[PATCH v3 5/5] nvme: add support weighted round robin queue

2019-06-24 Thread Weiping Zhang
-group_reporting write 512K RR WRR --- fio-1: 890 MiB/s 1150 MiB/s fio-2: 871 MiB/s 595 MiB/s fio-3: 895 MiB/s 188 MiB/s Signed-off-by: Weiping Zhang --- drivers/nvme/host/nvme.h

[PATCH v3 1/5] block: add weighted round robin for blkcgroup

2019-06-24 Thread Weiping Zhang
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 | 89

[PATCH v3 4/5] genirq/affinity: allow driver's discontigous affinity set

2019-06-24 Thread Weiping Zhang
The driver may implement multiple affinity set, and some of are empty, for this case we just skip them. Signed-off-by: Weiping Zhang --- kernel/irq/affinity.c | 4 1 file changed, 4 insertions(+) diff --git a/kernel/irq/affinity.c b/kernel/irq/affinity.c index f18cd5aa33e8..6d964fe0fbd8

[PATCH v3 0/5] Add support Weighted Round Robin for blkcg and nvme

2019-06-24 Thread Weiping Zhang
1150 MiB/s fio-2: 871 MiB/s 595 MiB/s fio-3: 895 MiB/s 188 MiB/s Changes since V2: * drop null_blk related patch, which adds a new NULL_Q_IRQ_WRR to simulte nvme wrr policy * add urgent tagset map for nvme driver * fix some problem in V2, suggested by Minwoo Chang

Re: [PATCH v3 2/5] nvme: add get_ams for nvme_ctrl_ops

2019-06-25 Thread Weiping Zhang
Minwoo Im 于2019年6月25日周二 上午6:01写道: > > On 19-06-24 22:29:05, Weiping Zhang wrote: > > The get_ams() will return the AMS(Arbitration Mechanism Selected) > > from the driver. > > > > Signed-off-by: Weiping Zhang > > Hello, Weiping. > > Sorry, but I don&#x

Re: [PATCH v3 3/5] nvme-pci: rename module parameter write_queues to read_queues

2019-06-25 Thread Weiping Zhang
Minwoo Im 于2019年6月25日周二 上午6:00写道: > > On 19-06-24 22:29:19, Weiping Zhang wrote: > > Now nvme support three type hardware queues, read, poll and default, > > this patch rename write_queues to read_queues to set the number of > > read queues more explicitly. This patch a

Re: [PATCH v3 4/5] genirq/affinity: allow driver's discontigous affinity set

2019-06-25 Thread Weiping Zhang
Thomas Gleixner 于2019年6月25日周二 下午3:36写道: > > MIng, > > On Tue, 25 Jun 2019, Ming Lei wrote: > > On Mon, Jun 24, 2019 at 05:42:39PM +0200, Thomas Gleixner wrote: > > > On Mon, 24 Jun 2019, Weiping Zhang wrote: > > > > > > > The driver may implemen

Re: [PATCH v3 5/5] nvme: add support weighted round robin queue

2019-06-25 Thread Weiping Zhang
Minwoo Im 于2019年6月25日周二 上午6:01写道: > > > @@ -2627,7 +2752,30 @@ static int nvme_pci_get_address(struct nvme_ctrl > > *ctrl, char *buf, int size) > > > > static void nvme_pci_get_ams(struct nvme_ctrl *ctrl, u32 *ams) > > { > > - *ams = NVME_CC_AMS_RR; > > + /* if deivce doesn't support WR

Re: [PATCH v3 5/5] nvme: add support weighted round robin queue

2019-06-28 Thread Weiping Zhang
Christoph Hellwig 于2019年6月27日周四 下午7:06写道: > > On Thu, Jun 27, 2019 at 07:37:19PM +0900, Minwoo Im wrote: > > Hi, Maintainers > > > > Would you guys please give some thoughts about this patch? I like this > > feature WRR addition to the driver so I really want to hear something > > from you guys.

Re: [PATCH v3 5/5] nvme: add support weighted round robin queue

2019-07-10 Thread Weiping Zhang
Weiping Zhang 于2019年6月28日周五 下午11:57写道: > > Christoph Hellwig 于2019年6月27日周四 下午7:06写道: > > > > On Thu, Jun 27, 2019 at 07:37:19PM +0900, Minwoo Im wrote: > > > Hi, Maintainers > > > > > > Would you guys please give some thoughts about this patch?

Re: [PATCH v3 0/5] Add support Weighted Round Robin for blkcg and nvme

2019-07-18 Thread Weiping Zhang
Weiping Zhang 于2019年6月24日周一 下午10:34写道: > > Hi, > > This series try to add Weighted Round Robin for block cgroup and nvme > driver. When multiple containers share a single nvme device, we want > to protect IO critical container from not be interfernced by other > contain

Re: [PATCH v3 1/5] block: add weighted round robin for blkcgroup

2019-07-23 Thread Weiping Zhang
Tejun Heo 于2019年7月18日周四 下午10:00写道: > > Hello, Weiping. > > On Mon, Jun 24, 2019 at 10:28:51PM +0800, Weiping Zhang wrote: > > +static const char *blk_wrr_name[BLK_WRR_COUNT] = { > > + [BLK_WRR_NONE] = "none", > > + [BLK_WRR_LOW]

Re: [PATCH v3 5/5] nvme: add support weighted round robin queue

2019-07-29 Thread Weiping Zhang
Weiping Zhang 于2019年7月10日周三 下午10:20写道: > > Weiping Zhang 于2019年6月28日周五 下午11:57写道: > > > > Christoph Hellwig 于2019年6月27日周四 下午7:06写道: > > > > > > On Thu, Jun 27, 2019 at 07:37:19PM +0900, Minwoo Im wrote: > > > > Hi, Maintainers > > > >

<    1   2