summaryrefslogtreecommitdiff
path: root/block/blk-mq.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2018-11-18 16:15:35 -0700
committerJens Axboe <axboe@kernel.dk>2018-11-26 08:26:04 -0700
commit4ab32bf3305eedb4d31f85cac68a67becab10494 (patch)
treed75d39772276a9be0ebadf1bc24dcf669007dd85 /block/blk-mq.c
parentaa61bec30eca11816789dc25c2090366b0ccfaf8 (diff)
downloadlwn-4ab32bf3305eedb4d31f85cac68a67becab10494.tar.gz
lwn-4ab32bf3305eedb4d31f85cac68a67becab10494.zip
blk-mq: never redirect polled IO completions
It's pointless to do so, we are by definition on the CPU we want/need to be, as that's the one waiting for a completion event. Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-mq.c')
-rw-r--r--block/blk-mq.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/block/blk-mq.c b/block/blk-mq.c
index ba3c7b6476b7..37674c1766a7 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -585,7 +585,12 @@ static void __blk_mq_complete_request(struct request *rq)
return;
}
- if (!test_bit(QUEUE_FLAG_SAME_COMP, &q->queue_flags)) {
+ /*
+ * For a polled request, always complete locallly, it's pointless
+ * to redirect the completion.
+ */
+ if ((rq->cmd_flags & REQ_HIPRI) ||
+ !test_bit(QUEUE_FLAG_SAME_COMP, &q->queue_flags)) {
q->mq_ops->complete(rq);
return;
}