diff options
author | Jens Axboe <axboe@fb.com> | 2017-01-25 16:11:38 +0100 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2017-01-25 16:11:38 +0100 |
commit | 200e86b3372b51e136a382e007b6b904b1dac7e4 (patch) | |
tree | f4d92877e39e0ea679fae27568724c898d333dd7 /block/blk-mq.c | |
parent | cfq-iosched: Adjust one function call together with a variable assignment (diff) | |
download | linux-200e86b3372b51e136a382e007b6b904b1dac7e4.tar.xz linux-200e86b3372b51e136a382e007b6b904b1dac7e4.zip |
blk-mq: only apply active queue tag throttling for driver tags
If we have a scheduler attached, we have two sets of tags. We don't
want to apply our active queue throttling for the scheduler side
of tags, that only applies to driver tags since that's the resource
we need to dispatch an IO.
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to '')
-rw-r--r-- | block/blk-mq.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/block/blk-mq.c b/block/blk-mq.c index ee69e5e89769..dcb567642db7 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -230,15 +230,14 @@ struct request *__blk_mq_alloc_request(struct blk_mq_alloc_data *data, rq = tags->static_rqs[tag]; - if (blk_mq_tag_busy(data->hctx)) { - rq->rq_flags = RQF_MQ_INFLIGHT; - atomic_inc(&data->hctx->nr_active); - } - if (data->flags & BLK_MQ_REQ_INTERNAL) { rq->tag = -1; rq->internal_tag = tag; } else { + if (blk_mq_tag_busy(data->hctx)) { + rq->rq_flags = RQF_MQ_INFLIGHT; + atomic_inc(&data->hctx->nr_active); + } rq->tag = tag; rq->internal_tag = -1; } @@ -869,6 +868,10 @@ done: rq->tag = blk_mq_get_tag(&data); if (rq->tag >= 0) { + if (blk_mq_tag_busy(data.hctx)) { + rq->rq_flags |= RQF_MQ_INFLIGHT; + atomic_inc(&data.hctx->nr_active); + } data.hctx->tags->rqs[rq->tag] = rq; goto done; } |