Re: [PATCH V2] blk-mq: don't schedule block kworker on isolated CPUs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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.



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux