Re: [PATCH 1/2] blk-mq: don't complete un-started request in timeout handler

2017-03-14 Thread Bart Van Assche
On Thu, 2017-03-09 at 21:02 +0800, Ming Lei wrote: > diff --git a/block/blk-mq.c b/block/blk-mq.c > index 159187a28d66..0aff380099d5 100644 > --- a/block/blk-mq.c > +++ b/block/blk-mq.c > @@ -697,17 +697,8 @@ static void blk_mq_check_expired(struct blk_mq_hw_ctx > *hctx, > { > struct

Re: [PATCH rfc 06/10] IB/cq: Don't force IB_POLL_DIRECT poll context for ib_process_cq_direct

2017-03-14 Thread Bart Van Assche
On Mon, 2017-03-13 at 10:24 +0200, Sagi Grimberg wrote: > > Before this patch > > the completions from each CQ were processed sequentially. That's a big > > change so I think this should be mentioned clearly in the header above > > ib_process_cq_direct(). > > Note that I now see that the cq lock

Re: [PATCH rfc 04/10] block: Add a non-selective polling interface

2017-03-14 Thread Bart Van Assche
On Mon, 2017-03-13 at 10:15 +0200, Sagi Grimberg wrote: > > Additionally, I think making the hardware context an argument of this > > function > > instead of using blk_mq_map_queue(q, smp_processor_id()) would make this > > function much more versatile. > > What do you mean? remember that the

Re: [PATCH 0/4] block: callback-based statistics

2017-03-14 Thread Omar Sandoval
On Tue, Mar 14, 2017 at 02:03:27PM -0700, Omar Sandoval wrote: > From: Omar Sandoval > > This patchset generalizes the blk-stats infrastructure to allow users to > register a callback to be called at a given time with the statistics of > requests completed during that window.

[PATCH 3/4] block: change stats from array type to struct type

2017-03-14 Thread Omar Sandoval
From: Omar Sandoval This is cleanup in preparation for callback-based stats with a couple of (minor) advantages: 1. Allocating a percpu array type is awkward. 2. It makes the callback type signature more clear. With `struct blk_rq_stat *`, the only way to know that you're

[PATCH 2/4] block: remove extra calls to wbt_exit()

2017-03-14 Thread Omar Sandoval
From: Omar Sandoval We always call wbt_exit() from blk_release_queue(), so these are unnecessary. Signed-off-by: Omar Sandoval --- block/blk-core.c | 1 - block/blk-mq.c | 2 -- 2 files changed, 3 deletions(-) diff --git a/block/blk-core.c b/block/blk-core.c

[PATCH 4/4] blk-stats: convert to callback-based statistics reporting

2017-03-14 Thread Omar Sandoval
From: Omar Sandoval Currently, statistics are gathered in ~0.13s windows, and users grab the statistics whenever they need them. This is not ideal for both in-tree users: 1. Writeback throttling wants its own dynamically sized window of statistics. Since the blk-stats

[PATCH 1/4] block: tear out blk-stat debugfs/sysfs entries

2017-03-14 Thread Omar Sandoval
From: Omar Sandoval These made sense when there was a single stats buffer for the request queue, but that's going away. Signed-off-by: Omar Sandoval --- block/blk-mq-debugfs.c | 55 -- block/blk-sysfs.c | 26

Re: [PATCH] blk-mq-sched: don't run the queue async from blk_mq_try_issue_directly()

2017-03-14 Thread Jens Axboe
On 03/14/2017 11:48 AM, Omar Sandoval wrote: > On Tue, Mar 14, 2017 at 08:57:50AM -0600, Jens Axboe wrote: >> If we have scheduling enabled, we jump directly to insert-and-run. >> That's fine, but we run the queue async and we don't pass in information >> on whether we can block from this context

Re: [PATCH] blk-mq-sched: don't run the queue async from blk_mq_try_issue_directly()

2017-03-14 Thread Omar Sandoval
On Tue, Mar 14, 2017 at 08:57:50AM -0600, Jens Axboe wrote: > If we have scheduling enabled, we jump directly to insert-and-run. > That's fine, but we run the queue async and we don't pass in information > on whether we can block from this context or not. Fixup both these > cases. Reviewed-by:

Re: [PATCH RFC 00/14] Add the BFQ I/O Scheduler to blk-mq

2017-03-14 Thread Bart Van Assche
On Tue, 2017-03-14 at 16:35 +0100, Paolo Valente wrote: > > Il giorno 07 mar 2017, alle ore 02:00, Bart Van Assche > > ha scritto: > > > > Additionally, the complexity of the code is huge. Just like for CFQ, > > sooner or later someone will run into a bug or a

Re: [PATCH RFC 00/14] Add the BFQ I/O Scheduler to blk-mq

2017-03-14 Thread Jens Axboe
On 03/14/2017 09:35 AM, Paolo Valente wrote: > First, I've developed BFQ in a sort of > first-the-problem-then-the-solution way. That is, each time, I have > first implemented a benchmark that enabled me to highlight the problem > and get all relevant statistics on it, then I have worked on BFQ

Re: [PATCH 4/4] blk-mq: streamline blk_mq_make_request

2017-03-14 Thread Bart Van Assche
On Mon, 2017-03-13 at 09:48 -0600, Christoph Hellwig wrote: > Turn the different ways of merging or issuing I/O into a series of if/else > statements instead of the current maze of gotos. Note that this means we > pin the CPU a little longer for some cases as the CTX put is moved to > common code

Re: [PATCH RFC 00/14] Add the BFQ I/O Scheduler to blk-mq

2017-03-14 Thread Paolo Valente
> Il giorno 07 mar 2017, alle ore 02:00, Bart Van Assche > ha scritto: > > On Sat, 2017-03-04 at 17:01 +0100, Paolo Valente wrote: >> Finally, a few details on the patchset. >> >> The first two patches introduce BFQ-v0, which is more or less the >> first version of

Re: [PATCH] blk-mq-sched: don't run the queue async from blk_mq_try_issue_directly()

2017-03-14 Thread Jens Axboe
On 03/14/2017 09:17 AM, Bart Van Assche wrote: > On 03/14/2017 07:57 AM, Jens Axboe wrote: >> If we have scheduling enabled, we jump directly to insert-and-run. >> That's fine, but we run the queue async and we don't pass in information >> on whether we can block from this context or not. Fixup

Re: [PATCH] blk-mq-sched: don't run the queue async from blk_mq_try_issue_directly()

2017-03-14 Thread Bart Van Assche
On 03/14/2017 07:57 AM, Jens Axboe wrote: > If we have scheduling enabled, we jump directly to insert-and-run. > That's fine, but we run the queue async and we don't pass in information > on whether we can block from this context or not. Fixup both these > cases. How about renaming "can_block"

Re: [PATCH 06/16] mmc: core: replace waitqueue with worker

2017-03-14 Thread Jens Axboe
On 03/14/2017 08:43 AM, Christoph Hellwig wrote: > On Tue, Mar 14, 2017 at 08:36:26AM -0600, Jens Axboe wrote: >> There's one case that doesn't look like it was converted properly, but >> that's a mistake. The general insert-and-run cases run inline if we can, >> but the direct-issue needs a

[PATCH] blk-mq-sched: don't run the queue async from blk_mq_try_issue_directly()

2017-03-14 Thread Jens Axboe
If we have scheduling enabled, we jump directly to insert-and-run. That's fine, but we run the queue async and we don't pass in information on whether we can block from this context or not. Fixup both these cases. Signed-off-by: Jens Axboe diff --git a/block/blk-mq.c

Re: [PATCH 06/16] mmc: core: replace waitqueue with worker

2017-03-14 Thread Christoph Hellwig
On Tue, Mar 14, 2017 at 08:36:26AM -0600, Jens Axboe wrote: > There's one case that doesn't look like it was converted properly, but > that's a mistake. The general insert-and-run cases run inline if we can, > but the direct-issue needs a fixup, see below. Note that blk_mq_try_issue_directly is

Re: [PATCH 06/16] mmc: core: replace waitqueue with worker

2017-03-14 Thread Jens Axboe
On 03/14/2017 06:59 AM, Adrian Hunter wrote: > On 13/03/17 16:19, Jens Axboe wrote: >> On 03/13/2017 03:25 AM, Adrian Hunter wrote: >>> On 11/03/17 00:05, Jens Axboe wrote: On 03/10/2017 07:21 AM, Adrian Hunter wrote: >> Essentially I take out that thread and replace it with this one

Re: [PATCH RFC 01/14] block, bfq: introduce the BFQ-v0 I/O scheduler as an extra scheduler

2017-03-14 Thread Paolo Valente
> Il giorno 06 mar 2017, alle ore 20:40, Bart Van Assche > ha scritto: > Hi Bart, thanks for such an accurate review. I'm addressing the issues you raised, and I'll get back in touch as soon as I have finished. Paolo > On 03/04/2017 08:01 AM, Paolo Valente

Re: [PATCH RFC 00/14] Add the BFQ I/O Scheduler to blk-mq

2017-03-14 Thread Paolo Valente
> Il giorno 07 mar 2017, alle ore 01:22, Bart Van Assche > ha scritto: > > On 03/04/2017 08:01 AM, Paolo Valente wrote: >> Some patch generates WARNINGS with checkpatch.pl, but these WARNINGS >> seem to be either unavoidable for the involved pieces of code (which >>

Re: [PATCH RFC 13/14] block, bfq: boost the throughput with random I/O on NCQ-capable HDDs

2017-03-14 Thread Paolo Valente
> Il giorno 07 mar 2017, alle ore 01:54, Bart Van Assche > ha scritto: > > On Sat, 2017-03-04 at 17:01 +0100, Paolo Valente wrote: >> @@ -8301,7 +8297,7 @@ static struct blkcg_policy blkcg_policy_bfq = { >> static int __init bfq_init(void) >> { >> int ret; >> -

Re: [PATCH 06/16] mmc: core: replace waitqueue with worker

2017-03-14 Thread Adrian Hunter
On 13/03/17 16:19, Jens Axboe wrote: > On 03/13/2017 03:25 AM, Adrian Hunter wrote: >> On 11/03/17 00:05, Jens Axboe wrote: >>> On 03/10/2017 07:21 AM, Adrian Hunter wrote: > Essentially I take out that thread and replace it with this one worker > introduced in this very patch. I agree the

Re: [PATCH RFC 01/14] block, bfq: introduce the BFQ-v0 I/O scheduler as an extra scheduler

2017-03-14 Thread Paolo Valente
> Il giorno 06 mar 2017, alle ore 21:46, Jens Axboe ha > scritto: > > On 03/05/2017 09:02 AM, Paolo Valente wrote: >> >>> Il giorno 05 mar 2017, alle ore 16:16, Jens Axboe ha >>> scritto: >>> >>> On 03/04/2017 09:01 AM, Paolo Valente wrote: We tag as