Re: blk-mq: check on cpu id when there is only one ctx mapping

From: Stanley Chu
Date: Wed May 31 2023 - 05:05:20 EST


On Wed, May 31, 2023 at 4:49 PM Ed Tsai <ed.tsai@xxxxxxxxxxxx> wrote:
>
> commit f168420 ("blk-mq: don't redirect completion for hctx withs only
> one ctx mapping") When nvme applies a 1:1 mapping of hctx and ctx, there
> will be no remote request.
>
> But for ufs, the submission and completion queues could be asymmetric.
> (e.g. Multiple SQs share one CQ) Therefore, 1:1 mapping of hctx and
> ctx won't complete request on the submission cpu. In this situation,
> this nr_ctx check could violate the QUEUE_FLAG_SAME_FORCE, as a result,
> check on cpu id when there is only one ctx mapping.
>
> Signed-off-by: Ed Tsai <ed.tsai@xxxxxxxxxxxx>
> Signed-off-by: Po-Wen Kao <powen.kao@xxxxxxxxxxxx>

Reviewed-by: Stanley Chu <stanley.chu@xxxxxxxxxxxx>