On Wed, Sep 21, 2022 at 11:32:03AM +0800, Liu Song wrote:
From: Liu Song <liusong@xxxxxxxxxxxxxxxxx>a larger number of?
High-performance NVMe devices usually support a large hw queue, which
/*Some very odd comment formatting and and indentation here.
- * For a polled request, always complete locally, it's pointless
- * to redirect the completion.
+ * For request which hctx has only one ctx mapping,
+ * or a polled request, always complete locally,
+ * it's pointless to redirect the completion.
*/
- if (rq->cmd_flags & REQ_POLLED)
+ if (rq->mq_hctx->nr_ctx == 1 ||
+ rq->cmd_flags & REQ_POLLED)