Messages in this thread | | | Date | Tue, 24 Oct 2023 09:53:49 -0700 | Subject | Re: [PATCH V2] blk-mq: don't schedule block kworker on isolated CPUs | From | Bart Van Assche <> |
| |
On 10/13/23 05:47, Ming Lei wrote: > @@ -3926,6 +3941,15 @@ static void blk_mq_map_swqueue(struct request_queue *q) > */ > sbitmap_resize(&hctx->ctx_map, hctx->nr_ctx); > > + /* > + * rule out isolated CPUs from hctx->cpumask for avoiding to > + * run wq worker on isolated CPU > + */ > + for_each_cpu(cpu, hctx->cpumask) { > + if (cpu_is_isolated(cpu)) > + cpumask_clear_cpu(cpu, hctx->cpumask); > + }
What will happen if this code makes hctx->cpumask empty? Code like blk_mq_first_mapped_cpu() and blk_mq_hctx_next_cpu() assumes that hctx->cpumask is not empty. There may be other code that assumes that hctx->cpumask is not empty.
Thanks,
Bart.
| |