public inbox for linux-nvme@lists.infradead.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Daniel Wagner <dwagner@suse.de>
Cc: Jens Axboe <axboe@kernel.dk>, Keith Busch <kbusch@kernel.org>,
	Sagi Grimberg <sagi@grimberg.me>,
	Thomas Gleixner <tglx@linutronix.de>,
	Christoph Hellwig <hch@lst.de>,
	Frederic Weisbecker <fweisbecker@suse.com>,
	Mel Gorman <mgorman@suse.de>, Hannes Reinecke <hare@suse.de>,
	Sridhar Balaraman <sbalaraman@parallelwireless.com>,
	"brookxu.cn" <brookxu.cn@gmail.com>,
	Ming Lei <ming.lei@redhat.com>,
	linux-kernel@vger.kernel.org, linux-block@vger.kernel.org,
	linux-nvme@lists.infradead.org
Subject: Re: [PATCH 2/3] nvme-pci: limit queue count to housekeeping cpus
Date: Sat, 22 Jun 2024 07:14:20 +0200	[thread overview]
Message-ID: <20240622051420.GC11303@lst.de> (raw)
In-Reply-To: <20240621-isolcpus-io-queues-v1-2-8b169bf41083@suse.de>

> 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.

> -	return num_possible_cpus() + dev->nr_write_queues + dev->nr_poll_queues;
> +	return blk_mq_num_possible_queues() + dev->nr_write_queues + dev->nr_poll_queues;

Please avoid the overly long line here.

Otherwise this looks good to me.



  reply	other threads:[~2024-06-22  5:14 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-21 13:53 [PATCH 0/3] nvme-pci: honor isolcpus configuration Daniel Wagner
2024-06-21 13:53 ` [PATCH 1/3] sched/isolation: Add io_queue housekeeping option Daniel Wagner
2024-06-22  5:11   ` Christoph Hellwig
2024-06-24  7:13     ` Daniel Wagner
2024-06-24  8:47       ` Christoph Hellwig
2024-06-24  9:00         ` Daniel Wagner
2024-06-25  6:37           ` Hannes Reinecke
2024-06-25  7:07             ` Thomas Gleixner
2024-06-25  8:57               ` Daniel Wagner
2024-06-30 13:47                 ` Ming Lei
2024-06-21 13:53 ` [PATCH 2/3] nvme-pci: limit queue count to housekeeping cpus Daniel Wagner
2024-06-22  5:14   ` Christoph Hellwig [this message]
2024-06-23  7:03     ` Sagi Grimberg
2024-06-21 13:53 ` [PATCH 3/3] lib/group_cpus.c: honor housekeeping config when grouping CPUs Daniel Wagner
2024-06-22  5:13   ` Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240622051420.GC11303@lst.de \
    --to=hch@lst.de \
    --cc=axboe@kernel.dk \
    --cc=brookxu.cn@gmail.com \
    --cc=dwagner@suse.de \
    --cc=fweisbecker@suse.com \
    --cc=hare@suse.de \
    --cc=kbusch@kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=mgorman@suse.de \
    --cc=ming.lei@redhat.com \
    --cc=sagi@grimberg.me \
    --cc=sbalaraman@parallelwireless.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox