Re: [PATCH 2/3] nvme-pci: limit queue count to housekeeping cpus

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

 





On 22/06/2024 8:14, Christoph Hellwig wrote:
diff --git a/block/blk-mq-cpumap.c b/block/blk-mq-cpumap.c
index 9638b25fd521..43c039900ef6 100644
--- a/block/blk-mq-cpumap.c
+++ b/block/blk-mq-cpumap.c
@@ -11,10 +11,23 @@
  #include <linux/smp.h>
  #include <linux/cpu.h>
  #include <linux/group_cpus.h>
+#include <linux/sched/isolation.h>
#include "blk.h"
  #include "blk-mq.h"
+unsigned int blk_mq_num_possible_queues(void)
+{
+	const struct cpumask *io_queue_mask;
+
+	io_queue_mask = housekeeping_cpumask(HK_TYPE_IO_QUEUE);
+	if (!cpumask_empty(io_queue_mask))
+		return cpumask_weight(io_queue_mask);
+
+	return num_possible_cpus();
+}
+EXPORT_SYMBOL_GPL(blk_mq_num_possible_queues);
This should be split into a separate patch.  And it could really use
a kerneldoc comment.

Agree.

Other than that, looks good.




[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