Message ID | a3216031-0801-45e2-320c-bfc88fa742b4@kernel.dk (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
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 only called for the multiple hardware queue case, so MMC would not hit it.
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 fixup, see below. > > Note that blk_mq_try_issue_directly is only called for the multiple > hardware queue case, so MMC would not hit it. Right, which is why I said that the general case works fine, it's only the explicit issue-direct that currently does not. Not by design, just an error.
On Tue, Mar 14, 2017 at 3:36 PM, Jens Axboe <axboe@kernel.dk> 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. > > > diff --git a/block/blk-mq.c b/block/blk-mq.c > index 159187a28d66..4196d6bee92d 100644 > --- a/block/blk-mq.c > +++ b/block/blk-mq.c > @@ -1434,7 +1434,8 @@ static blk_qc_t request_to_qc_t(struct blk_mq_hw_ctx *hctx, struct request *rq) > return blk_tag_to_qc_t(rq->internal_tag, hctx->queue_num, true); > } > > -static void blk_mq_try_issue_directly(struct request *rq, blk_qc_t *cookie) > +static void blk_mq_try_issue_directly(struct request *rq, blk_qc_t *cookie, > + bool can_block) > { > struct request_queue *q = rq->q; > struct blk_mq_queue_data bd = { > @@ -1475,7 +1476,7 @@ static void blk_mq_try_issue_directly(struct request *rq, blk_qc_t *cookie) > } > > insert: > - blk_mq_sched_insert_request(rq, false, true, true, false); > + blk_mq_sched_insert_request(rq, false, true, false, can_block); > } > > /* > @@ -1569,11 +1570,11 @@ static blk_qc_t blk_mq_make_request(struct request_queue *q, struct bio *bio) > > if (!(data.hctx->flags & BLK_MQ_F_BLOCKING)) { > rcu_read_lock(); > - blk_mq_try_issue_directly(old_rq, &cookie); > + blk_mq_try_issue_directly(old_rq, &cookie, false); > rcu_read_unlock(); > } else { > srcu_idx = srcu_read_lock(&data.hctx->queue_rq_srcu); > - blk_mq_try_issue_directly(old_rq, &cookie); > + blk_mq_try_issue_directly(old_rq, &cookie, true); > srcu_read_unlock(&data.hctx->queue_rq_srcu, srcu_idx); > } > goto done; Jens do you have this in your patch queue or is it something you want us to test and submit back to you? Yours, Linus Walleij
diff --git a/block/blk-mq.c b/block/blk-mq.c index 159187a28d66..4196d6bee92d 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -1434,7 +1434,8 @@ static blk_qc_t request_to_qc_t(struct blk_mq_hw_ctx *hctx, struct request *rq) return blk_tag_to_qc_t(rq->internal_tag, hctx->queue_num, true); } -static void blk_mq_try_issue_directly(struct request *rq, blk_qc_t *cookie) +static void blk_mq_try_issue_directly(struct request *rq, blk_qc_t *cookie, + bool can_block) { struct request_queue *q = rq->q; struct blk_mq_queue_data bd = { @@ -1475,7 +1476,7 @@ static void blk_mq_try_issue_directly(struct request *rq, blk_qc_t *cookie) } insert: - blk_mq_sched_insert_request(rq, false, true, true, false); + blk_mq_sched_insert_request(rq, false, true, false, can_block); } /* @@ -1569,11 +1570,11 @@ static blk_qc_t blk_mq_make_request(struct request_queue *q, struct bio *bio) if (!(data.hctx->flags & BLK_MQ_F_BLOCKING)) { rcu_read_lock(); - blk_mq_try_issue_directly(old_rq, &cookie); + blk_mq_try_issue_directly(old_rq, &cookie, false); rcu_read_unlock(); } else { srcu_idx = srcu_read_lock(&data.hctx->queue_rq_srcu); - blk_mq_try_issue_directly(old_rq, &cookie); + blk_mq_try_issue_directly(old_rq, &cookie, true); srcu_read_unlock(&data.hctx->queue_rq_srcu, srcu_idx); } goto done;