Messages in this thread | | | Date | Mon, 28 Jun 2021 11:07:03 +0200 | From | Daniel Wagner <> | Subject | Re: [PATCH 1/1] block: System crashes when cpu hotplug + bouncing port |
| |
Hi Wen,
On Sun, Jun 27, 2021 at 10:14:32PM -0500, wenxiong@linux.vnet.ibm.com wrote: > @@ -468,8 +467,7 @@ struct request *blk_mq_alloc_request_hctx(struct request_queue *q, > data.hctx = q->queue_hw_ctx[hctx_idx]; > if (!blk_mq_hw_queue_mapped(data.hctx)) > goto out_queue_exit; > - cpu = cpumask_first_and(data.hctx->cpumask, cpu_online_mask); > - data.ctx = __blk_mq_get_ctx(q, cpu); > + data.ctx = __blk_mq_get_ctx(q, hctx_idx);
hctx_idx is just an index, not a CPU id. In this scenario, the hctx_idx used to lookup the context happens to be valid. I am still a bit confused why [1] doesn't work for this scenario.
As Ming pointed out in [2] we need to update cpumask for CPU hotplug events.
Thanks, Daniel
[1] https://lore.kernel.org/linux-block/20210608183339.70609-1-dwagner@suse.de/ [2] https://lore.kernel.org/linux-nvme/YNXTaUMAFCA84jfZ@T590/
| |