in blk_mq_realloc_hw_ctxs(set, q) set the effective nr_hw_queues, so use this to set the local node in blk_mq_init_cpu_queues. Signed-off-by: john.gong <johngong0791@xxxxxxxxx> --- block/blk-mq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/blk-mq.c b/block/blk-mq.c index a69ad12..7a97a7d 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -2339,7 +2339,7 @@ struct request_queue *blk_mq_init_allocated_queue(struct blk_mq_tag_set *set, if (set->ops->complete) blk_queue_softirq_done(q, set->ops->complete); - blk_mq_init_cpu_queues(q, set->nr_hw_queues); + blk_mq_init_cpu_queues(q, q->nr_hw_queues); get_online_cpus(); mutex_lock(&all_q_mutex); -- 1.9.1