Re: [PATCH 1/4] blk-mq: introduce BLK_MQ_F_SCHED_USE_HW_TAG

2017-05-03 Thread Ming Lei
On Wed, May 03, 2017 at 08:13:03PM -0600, Jens Axboe wrote: > On 05/03/2017 08:01 PM, Ming Lei wrote: > > On Thu, May 4, 2017 at 5:40 AM, Omar Sandoval wrote: > >> On Thu, May 04, 2017 at 04:13:51AM +0800, Ming Lei wrote: > >>> On Thu, May 4, 2017 at 12:46 AM, Omar Sandoval

Re: [PATCH 1/4] blk-mq: introduce BLK_MQ_F_SCHED_USE_HW_TAG

2017-05-03 Thread Jens Axboe
On 05/03/2017 08:01 PM, Ming Lei wrote: > On Thu, May 4, 2017 at 5:40 AM, Omar Sandoval wrote: >> On Thu, May 04, 2017 at 04:13:51AM +0800, Ming Lei wrote: >>> On Thu, May 4, 2017 at 12:46 AM, Omar Sandoval wrote: On Fri, Apr 28, 2017 at 11:15:36PM

Re: [PATCH V2 4/5] blk-mq: use hw tag for scheduling if hw tag space is big enough

2017-05-03 Thread Ming Lei
On Wed, May 03, 2017 at 02:14:45PM -0600, Jens Axboe wrote: > On Thu, May 04 2017, Ming Lei wrote: > > diff --git a/block/blk-mq-sched.h b/block/blk-mq-sched.h > > index edafb5383b7b..241d23c18181 100644 > > --- a/block/blk-mq-sched.h > > +++ b/block/blk-mq-sched.h > > @@ -129,4 +136,19 @@ static

Re: [PATCH 2/4] blk-mq: introduce blk_mq_get_queue_depth()

2017-05-03 Thread Ming Lei
On Wed, May 03, 2017 at 09:55:30AM -0700, Omar Sandoval wrote: > On Fri, Apr 28, 2017 at 11:15:37PM +0800, Ming Lei wrote: > > The hardware queue depth can be resized via blk_mq_update_nr_requests(), > > so introduce this helper for retrieving queue's depth easily. > > One nit below. If the

Re: [PATCH 1/4] blk-mq: introduce BLK_MQ_F_SCHED_USE_HW_TAG

2017-05-03 Thread Ming Lei
On Thu, May 4, 2017 at 5:40 AM, Omar Sandoval wrote: > On Thu, May 04, 2017 at 04:13:51AM +0800, Ming Lei wrote: >> On Thu, May 4, 2017 at 12:46 AM, Omar Sandoval wrote: >> > On Fri, Apr 28, 2017 at 11:15:36PM +0800, Ming Lei wrote: >> >> When blk-mq I/O

Re: [PATCH 3/9] blk-mq-debugfs: get rid of a bunch of boilerplate

2017-05-03 Thread Omar Sandoval
On Wed, May 03, 2017 at 08:51:11PM +, Bart Van Assche wrote: > On Wed, 2017-05-03 at 12:18 -0700, Omar Sandoval wrote: > > From: Omar Sandoval > > > > A large part of blk-mq-debugfs.c is file_operations and seq_file > > boilerplate. This sucks as is but will suck even more

Re: [PATCH 1/4] blk-mq: introduce BLK_MQ_F_SCHED_USE_HW_TAG

2017-05-03 Thread Omar Sandoval
On Thu, May 04, 2017 at 04:13:51AM +0800, Ming Lei wrote: > On Thu, May 4, 2017 at 12:46 AM, Omar Sandoval wrote: > > On Fri, Apr 28, 2017 at 11:15:36PM +0800, Ming Lei wrote: > >> When blk-mq I/O scheduler is used, we need two tags for > >> submitting one request. One is

Crash in function called from __blkg_release_rcu()

2017-05-03 Thread Bart Van Assche
Hello Tejun and Christoph, While testing a series of SCSI target patches I ran into the following crash in the initiator call stack after I requested the iSCSI initiator code to log out: general protection fault: [#1] SMP Modules linked in: target_core_user uio target_core_iblock

[PATCH V2 2/5] blk-mq: introduce blk_mq_get_queue_depth()

2017-05-03 Thread Ming Lei
The hardware queue depth can be resized via blk_mq_update_nr_requests(), so introduce this helper for retrieving queue's depth easily. Signed-off-by: Ming Lei --- block/blk-mq.c | 12 block/blk-mq.h | 1 + 2 files changed, 13 insertions(+) diff --git

[PATCH V2 1/5] blk-mq: introduce BLK_MQ_F_SCHED_USE_HW_TAG

2017-05-03 Thread Ming Lei
When blk-mq I/O scheduler is used, we need two tags for submitting one request. One is called scheduler tag for allocating request and scheduling I/O, another one is called driver tag, which is used for dispatching IO to hardware/driver. This way introduces one extra per-queue allocation for both

[PATCH] ARM: Fix rd_size declaration

2017-05-03 Thread Bart Van Assche
The global variable 'rd_size' is declared as 'int' in source file arch/arm/kernel/atags_parse.c and as 'unsigned long' in drivers/block/brd.c. Fix this inconsistency. Additionally, remove the declarations of rd_image_start, rd_prompt and rd_doload from parse_tag_ramdisk() since these duplicate

Re: [PATCH] ARM: Fix rd_size declaration

2017-05-03 Thread Bart Van Assche
On Wed, 2017-05-03 at 20:25 +0100, Russell King - ARM Linux wrote: > There were comments on the patch which seemed to be unresolved. Do you mean the header guard? That's easy to resolve. > However, it would be nice if rd_size could go with some other related > declarations somewhere (if there

Re: [PATCH] ARM: Fix rd_size declaration

2017-05-03 Thread Russell King - ARM Linux
On Wed, Apr 26, 2017 at 08:51:35PM +, Bart Van Assche wrote: > On Mon, 2017-04-17 at 16:10 -0700, Bart Van Assche wrote: > > The global variable 'rd_size' is declared as 'int' in source file > > arch/arm/kernel/atags_parse.c and as 'unsigned long' in > > drivers/block/brd.c. Fix this

[PATCH 8/9] kyber: add debugfs attributes

2017-05-03 Thread Omar Sandoval
From: Omar Sandoval Expose the domain token pools, asynchronous sbitmap depth, domain request lists, and batching state. Signed-off-by: Omar Sandoval --- block/blk-mq-debugfs.c | 2 +- block/blk-mq-debugfs.h | 2 + block/kyber-iosched.c | 130

[PATCH 7/9] blk-mq-debugfs: allow schedulers to register debugfs attributes

2017-05-03 Thread Omar Sandoval
From: Omar Sandoval This provides the infrastructure for schedulers to expose their internal state through debugfs. We add a list of queue attributes and a list of hctx attributes to struct elevator_type and wire them up when switching schedulers. Signed-off-by: Omar Sandoval

[PATCH 9/9] mq-deadline: add debugfs attributes

2017-05-03 Thread Omar Sandoval
From: Omar Sandoval Expose the fifo lists, cached next requests, batching state, and dispatch list. It'd also be possible to add the sorted lists, but there aren't already seq_file helpers for rbtrees. Signed-off-by: Omar Sandoval --- block/blk-mq-debugfs.c |

[PATCH 6/9] blk-mq: untangle debugfs and sysfs

2017-05-03 Thread Omar Sandoval
From: Omar Sandoval Originally, I tied debugfs registration/unregistration together with sysfs. There's no reason to do this, and it's getting in the way of letting schedulers define their own debugfs attributes. Instead, tie the debugfs registration to the lifetime of the

[PATCH 4/9] blk-mq: Do not invoke queue operations on a dead queue

2017-05-03 Thread Omar Sandoval
From: Bart Van Assche In commit e869b5462f83 ("blk-mq: Unregister debugfs attributes earlier"), we shuffled the debugfs cleanup around so that the "state" attribute was removed before we freed the blk-mq data structures. However, later changes are going to undo that,

[PATCH 5/9] blk-mq: move debugfs declarations to a separate header file

2017-05-03 Thread Omar Sandoval
From: Omar Sandoval Preparation for adding more declarations. Signed-off-by: Omar Sandoval --- block/blk-core.c | 1 + block/blk-mq-debugfs.c | 1 + block/blk-mq-debugfs.h | 29 + block/blk-mq-sysfs.c | 1 + block/blk-mq.h

[PATCH 3/9] blk-mq-debugfs: get rid of a bunch of boilerplate

2017-05-03 Thread Omar Sandoval
From: Omar Sandoval A large part of blk-mq-debugfs.c is file_operations and seq_file boilerplate. This sucks as is but will suck even more when schedulers can define their own debugfs entries. Factor it all out into a single blk_mq_debugfs_fops which multiplexes as needed. We

[PATCH 0/9] blk-mq-debugfs: scheduler support and cleanups

2017-05-03 Thread Omar Sandoval
From: Omar Sandoval Hi, This series makes more enhancements to blk-mq-debugfs. - Patch 1 is a subjective change. - Patches 2 and 3 are cleanups. - Patch 4 is Bart's patch from a couple of weeks ago, necessitated by patch 6. - Patch 5 is another cleanup. - Patch 6 reworks the

[PATCH 1/9] blk-mq-debugfs: separate flags with |

2017-05-03 Thread Omar Sandoval
From: Omar Sandoval This reads more naturally than spaces. Signed-off-by: Omar Sandoval --- block/blk-mq-debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/blk-mq-debugfs.c b/block/blk-mq-debugfs.c index

Re: [PATCH] brd: fix uninitialized use of brd->dax_dev

2017-05-03 Thread Dan Williams
On Wed, May 3, 2017 at 5:56 AM, Gerald Schaefer wrote: > commit 1647b9b9 "brd: add dax_operations support" introduced the allocation > and freeing of a dax_device, but the allocated dax_device is not stored > into the brd_device, so brd_del_one() will eventually

[PATCH 2/2] blk-mq-debugfs: Add spaces in queue_poll_stat_show()

2017-05-03 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 3 May 2017 20:18:22 +0200 Use space characters at some source code places according to the Linux coding style convention. Signed-off-by: Markus Elfring --- block/blk-mq-debugfs.c | 10 +- 1

[PATCH 1/2] blk-mq-debugfs: Replace seven seq_puts() calls by seq_putc()

2017-05-03 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 3 May 2017 20:00:49 +0200 A few single characters should be put into a sequence. Thus use the corresponding function "seq_putc". This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring

[PATCH 0/2] blk-mq-debugfs: Fine-tuning for five function implementations

2017-05-03 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 3 May 2017 20:30:40 +0200 Two update suggestions were taken into account from static source code analysis. Markus Elfring (2): Replace seven seq_puts() calls by seq_putc() Add spaces in queue_poll_stat_show()

Re: [PATCH 0/4] blk-mq: support to use hw tag for scheduling

2017-05-03 Thread Bart Van Assche
On Wed, 2017-05-03 at 11:40 -0600, Jens Axboe wrote: > Subject: [PATCH] blk-mq: don't use sync workqueue flushing from drivers > > A previous commit introduced the sync flush, which we need from > internal callers like blk_mq_quiesce_queue(). However, we also > call the stop helpers from drivers,

Re: [PATCH 0/4] blk-mq: support to use hw tag for scheduling

2017-05-03 Thread Bart Van Assche
On Thu, 2017-05-04 at 01:19 +0800, Ming Lei wrote: > On Wed, May 03, 2017 at 05:08:30PM +, Bart Van Assche wrote: > > Callers of blk_mq_quiesce_queue() really need blk_mq_stop_hw_queue() to > > cancel delayed work synchronously. The above call stack shows that we have > > to do something about

Re: [PATCH 0/4] blk-mq: support to use hw tag for scheduling

2017-05-03 Thread Jens Axboe
On 05/03/2017 11:35 AM, Bart Van Assche wrote: > On Wed, 2017-05-03 at 11:24 -0600, Jens Axboe wrote: >> diff --git a/drivers/block/mtip32xx/mtip32xx.c >> b/drivers/block/mtip32xx/mtip32xx.c >> index 3a779a4f5653..33b5d1382c45 100644 >> --- a/drivers/block/mtip32xx/mtip32xx.c >> +++

Re: [PATCH 0/4] blk-mq: support to use hw tag for scheduling

2017-05-03 Thread Bart Van Assche
On Wed, 2017-05-03 at 11:24 -0600, Jens Axboe wrote: > diff --git a/drivers/block/mtip32xx/mtip32xx.c > b/drivers/block/mtip32xx/mtip32xx.c > index 3a779a4f5653..33b5d1382c45 100644 > --- a/drivers/block/mtip32xx/mtip32xx.c > +++ b/drivers/block/mtip32xx/mtip32xx.c > [ ... ] > @@ -4009,7 +4009,7

Re: [PATCH 3/4] blk-mq: use hw tag for scheduling if hw tag space is big enough

2017-05-03 Thread Ming Lei
On Wed, May 03, 2017 at 10:00:04AM -0700, Omar Sandoval wrote: > On Thu, May 04, 2017 at 12:55:30AM +0800, Ming Lei wrote: > > On Wed, May 03, 2017 at 09:29:36AM -0700, Omar Sandoval wrote: > > > On Fri, Apr 28, 2017 at 11:15:38PM +0800, Ming Lei wrote: > > > > When tag space of one device is big

Re: [PATCH 0/4] blk-mq: support to use hw tag for scheduling

2017-05-03 Thread Jens Axboe
On 05/03/2017 11:15 AM, Bart Van Assche wrote: > On Wed, 2017-05-03 at 11:07 -0600, Jens Axboe wrote: >> +void blk_mq_stop_hw_queues(struct request_queue *q) >> +{ >> +__blk_mq_stop_hw_queues(q, false); >> } >> EXPORT_SYMBOL(blk_mq_stop_hw_queues); > > Hello Jens, > > So the approach of

Re: [PATCH 0/4] blk-mq: support to use hw tag for scheduling

2017-05-03 Thread Ming Lei
On Wed, May 03, 2017 at 05:08:30PM +, Bart Van Assche wrote: > On Thu, 2017-05-04 at 00:52 +0800, Ming Lei wrote: > > Looks v4.11 plus your for-linus often triggers the following hang during > > boot, and it seems caused by the change in (blk-mq: unify hctx > > delayed_run_work > > and

Re: [PATCH 0/4] blk-mq: support to use hw tag for scheduling

2017-05-03 Thread Bart Van Assche
On Thu, 2017-05-04 at 00:52 +0800, Ming Lei wrote: > Looks v4.11 plus your for-linus often triggers the following hang during > boot, and it seems caused by the change in (blk-mq: unify hctx > delayed_run_work > and run_work) > > > BUG: scheduling while atomic: kworker/0:1H/704/0x0002 >

Re: [PATCH 0/4] blk-mq: support to use hw tag for scheduling

2017-05-03 Thread Jens Axboe
On 05/03/2017 11:03 AM, Ming Lei wrote: > On Thu, May 04, 2017 at 12:52:06AM +0800, Ming Lei wrote: >> On Wed, May 03, 2017 at 11:38:09PM +0800, Ming Lei wrote: >>> On Wed, May 03, 2017 at 09:08:34AM -0600, Jens Axboe wrote: On 05/03/2017 09:03 AM, Ming Lei wrote: > On Wed, May 03, 2017

Re: [PATCH 0/4] blk-mq: support to use hw tag for scheduling

2017-05-03 Thread Ming Lei
On Thu, May 04, 2017 at 12:52:06AM +0800, Ming Lei wrote: > On Wed, May 03, 2017 at 11:38:09PM +0800, Ming Lei wrote: > > On Wed, May 03, 2017 at 09:08:34AM -0600, Jens Axboe wrote: > > > On 05/03/2017 09:03 AM, Ming Lei wrote: > > > > On Wed, May 03, 2017 at 08:10:58AM -0600, Jens Axboe wrote: >

Re: [PATCH 3/4] blk-mq: use hw tag for scheduling if hw tag space is big enough

2017-05-03 Thread Omar Sandoval
On Thu, May 04, 2017 at 12:55:30AM +0800, Ming Lei wrote: > On Wed, May 03, 2017 at 09:29:36AM -0700, Omar Sandoval wrote: > > On Fri, Apr 28, 2017 at 11:15:38PM +0800, Ming Lei wrote: > > > When tag space of one device is big enough, we use hw tag > > > directly for I/O scheduling. > > > > > >

Re: [PATCH 3/4] blk-mq: use hw tag for scheduling if hw tag space is big enough

2017-05-03 Thread Ming Lei
On Wed, May 03, 2017 at 09:29:36AM -0700, Omar Sandoval wrote: > On Fri, Apr 28, 2017 at 11:15:38PM +0800, Ming Lei wrote: > > When tag space of one device is big enough, we use hw tag > > directly for I/O scheduling. > > > > Now the decision is made if hw queue depth is not less than > >

Re: [PATCH 2/4] blk-mq: introduce blk_mq_get_queue_depth()

2017-05-03 Thread Omar Sandoval
On Fri, Apr 28, 2017 at 11:15:37PM +0800, Ming Lei wrote: > The hardware queue depth can be resized via blk_mq_update_nr_requests(), > so introduce this helper for retrieving queue's depth easily. One nit below. If the per-hardware queue tag space situation changes, we can revisit this and the

Re: [PATCH 1/4] blk-mq: introduce BLK_MQ_F_SCHED_USE_HW_TAG

2017-05-03 Thread Omar Sandoval
On Fri, Apr 28, 2017 at 11:15:36PM +0800, Ming Lei wrote: > When blk-mq I/O scheduler is used, we need two tags for > submitting one request. One is called scheduler tag for > allocating request and scheduling I/O, another one is called > driver tag, which is used for dispatching IO to

Re: [PATCH 3/4] blk-mq: use hw tag for scheduling if hw tag space is big enough

2017-05-03 Thread Omar Sandoval
On Fri, Apr 28, 2017 at 11:15:38PM +0800, Ming Lei wrote: > When tag space of one device is big enough, we use hw tag > directly for I/O scheduling. > > Now the decision is made if hw queue depth is not less than > q->nr_requests and the tag set isn't shared. > > Signed-off-by: Ming Lei

Re: [PATCH 1/4] blk-mq: introduce BLK_MQ_F_SCHED_USE_HW_TAG

2017-05-03 Thread Omar Sandoval
On Fri, Apr 28, 2017 at 11:15:36PM +0800, Ming Lei wrote: > When blk-mq I/O scheduler is used, we need two tags for > submitting one request. One is called scheduler tag for > allocating request and scheduling I/O, another one is called > driver tag, which is used for dispatching IO to

Re: [PATCH 0/4] blk-mq: support to use hw tag for scheduling

2017-05-03 Thread Ming Lei
On Wed, May 03, 2017 at 09:06:27AM -0700, Omar Sandoval wrote: > On Wed, May 03, 2017 at 11:38:09PM +0800, Ming Lei wrote: > > On Wed, May 03, 2017 at 09:08:34AM -0600, Jens Axboe wrote: > > > Sounds good. I just wanted to check the numbers here, with the series > > > applied on top of for-linus

Re: [PATCH 3/9] bio-integrity: bio_integrity_advance must update integrity seed

2017-05-03 Thread Dmitry Monakhov
"Martin K. Petersen" writes: > Dmitry Monakhov writes: > >> SCSI drivers do care about bip_seed so we must update it accordingly. > >> +bip->bip_iter.bi_sector += bytes_done >> 9; > > This needs to count protection intervals. Otherwise

Re: [PATCH 0/4] blk-mq: support to use hw tag for scheduling

2017-05-03 Thread Ming Lei
On Wed, May 03, 2017 at 09:08:34AM -0600, Jens Axboe wrote: > On 05/03/2017 09:03 AM, Ming Lei wrote: > > On Wed, May 03, 2017 at 08:10:58AM -0600, Jens Axboe wrote: > >> On 05/03/2017 08:08 AM, Jens Axboe wrote: > >>> On 05/02/2017 10:03 PM, Ming Lei wrote: > On Fri, Apr 28, 2017 at

Re: Playing with BFQ

2017-05-03 Thread Paolo Valente
> Il giorno 03 mag 2017, alle ore 10:00, Sedat Dilek ha > scritto: > > On Tue, May 2, 2017 at 2:16 PM, Markus Trippelsdorf > wrote: >> On 2017.05.02 at 14:07 +0200, Sedat Dilek wrote: >>> On Tue, May 2, 2017 at 10:00 AM, Markus Trippelsdorf >>>

Re: Playing with BFQ

2017-05-03 Thread Markus Trippelsdorf
On 2017.05.03 at 10:00 +0200, Sedat Dilek wrote: > On Tue, May 2, 2017 at 2:16 PM, Markus Trippelsdorf > wrote: > > On 2017.05.02 at 14:07 +0200, Sedat Dilek wrote: > >> On Tue, May 2, 2017 at 10:00 AM, Markus Trippelsdorf > >> wrote: > >> > On

Re: [PATCH v2 3/6] RDMA/core: expose affinity mappings per completion vector

2017-05-03 Thread Sagi Grimberg
This will allow ULPs to intelligently locate threads based on completion vector cpu affinity mappings. In case the driver does not expose a get_vector_affinity callout, return NULL so the caller can maintain a fallback logic. Reviewed-by: Christoph Hellwig Signed-off-by: Sagi

Re: Playing with BFQ

2017-05-03 Thread Sedat Dilek
On Tue, May 2, 2017 at 2:16 PM, Markus Trippelsdorf wrote: > On 2017.05.02 at 14:07 +0200, Sedat Dilek wrote: >> On Tue, May 2, 2017 at 10:00 AM, Markus Trippelsdorf >> wrote: >> > On 2017.05.02 at 09:54 +0200, Sedat Dilek wrote: >> >> Hi, >> >> >>

Re: update ->init_request and ->exit_request prototypes

2017-05-03 Thread Sagi Grimberg
Turns out that while Jeff was right that this won't work against for-4.12/post-merge, it applies without fuzz and works fine against for-next. Sorry for the confusion. Regardless of that, series looks like a nice cleanup to me, you can add to your respin: Reviewed-by: Sagi Grimberg

Re: [PATCH 09/13] lightnvm/pblk-read: use bio_clone_fast()

2017-05-03 Thread Javier González
> On 2 May 2017, at 23.51, NeilBrown wrote: > >> >> Hi Neil, >> >> Looks good. Thanks for fixing this. I did not know that bio_clone_bioset >> was not supposed to be used on drivers. > > Prior to my patchset, using bio_clone_bioset() wasn't wrong in drivers, > though it was a