lkml.org 
[lkml]   [2023]   [Oct]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH V2] blk-mq: don't schedule block kworker on isolated CPUs
From

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.

\
 
 \ /
  Last update: 2023-10-24 18:56    [W:0.985 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site