Skip to content

Commit

Permalink
blk-mq: never redirect polled IO completions
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jens Axboe committed Nov 26, 2018
1 parent aa61bec commit 4ab32bf
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion block/blk-mq.c
Original file line number Diff line number Diff line change
@@ -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;
}

0 comments on commit 4ab32bf

Please sign in to comment.