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

From: Christoph Hellwig
Date: Wed Jun 14 2023 - 02:19:17 EST


This looks fine to me:

Reviewed-by: Christoph Hellwig <hch@xxxxxx>
> - if (rq->mq_hctx->nr_ctx == 1 ||
> + if ((rq->mq_hctx->nr_ctx == 1 &&
> + rq->mq_ctx->cpu == raw_smp_processor_id()) ||
> rq->cmd_flags & REQ_POLLED)

But please fix the incorrct indentation in the existing code here
please while you're at it (maybe Jens can just fold it in):

if ((rq->mq_hctx->nr_ctx == 1 &&
rq->mq_ctx->cpu == raw_smp_processor_id()) ||
(rq->cmd_flags & REQ_POLLED))