From: Keith Busch <keith.busch@intel.com>
To: Christoph Hellwig <hch@lst.de>
Cc: axboe@fb.com, linux-block@vger.kernel.org,
linux-nvme@lists.infradead.org
Subject: Re: [PATCH 4/7] blk-mq: allow the driver to pass in an affinity mask
Date: Wed, 31 Aug 2016 12:38:53 -0400 [thread overview]
Message-ID: <20160831163852.GB5598@localhost.localdomain> (raw)
In-Reply-To: <1472468013-29936-5-git-send-email-hch@lst.de>
On Mon, Aug 29, 2016 at 12:53:30PM +0200, Christoph Hellwig wrote:
> +static int blk_mq_create_mq_map(struct blk_mq_tag_set *set,
> + const struct cpumask *affinity_mask)
> +{
> + int queue = -1, cpu = 0;
> +
> + set->mq_map = kzalloc_node(sizeof(*set->mq_map) * nr_cpu_ids,
> + GFP_KERNEL, set->numa_node);
> + if (!set->mq_map)
> + return -ENOMEM;
> +
> + if (!affinity_mask)
> + return 0; /* map all cpus to queue 0 */
> +
> + /* If cpus are offline, map them to first hctx */
> + for_each_online_cpu(cpu) {
> + if (cpumask_test_cpu(cpu, affinity_mask))
> + queue++;
> + if (queue >= 0)
> + set->mq_map[cpu] = queue;
> + }
This can't be right. We have a single affinity mask for the entire
set, but what I think we want is an one affinity mask for each
nr_io_queues. The irq_create_affinity_mask should then create an array
of cpumasks based on nr_vecs..
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
WARNING: multiple messages have this Message-ID (diff)
From: keith.busch@intel.com (Keith Busch)
Subject: [PATCH 4/7] blk-mq: allow the driver to pass in an affinity mask
Date: Wed, 31 Aug 2016 12:38:53 -0400 [thread overview]
Message-ID: <20160831163852.GB5598@localhost.localdomain> (raw)
In-Reply-To: <1472468013-29936-5-git-send-email-hch@lst.de>
On Mon, Aug 29, 2016@12:53:30PM +0200, Christoph Hellwig wrote:
> +static int blk_mq_create_mq_map(struct blk_mq_tag_set *set,
> + const struct cpumask *affinity_mask)
> +{
> + int queue = -1, cpu = 0;
> +
> + set->mq_map = kzalloc_node(sizeof(*set->mq_map) * nr_cpu_ids,
> + GFP_KERNEL, set->numa_node);
> + if (!set->mq_map)
> + return -ENOMEM;
> +
> + if (!affinity_mask)
> + return 0; /* map all cpus to queue 0 */
> +
> + /* If cpus are offline, map them to first hctx */
> + for_each_online_cpu(cpu) {
> + if (cpumask_test_cpu(cpu, affinity_mask))
> + queue++;
> + if (queue >= 0)
> + set->mq_map[cpu] = queue;
> + }
This can't be right. We have a single affinity mask for the entire
set, but what I think we want is an one affinity mask for each
nr_io_queues. The irq_create_affinity_mask should then create an array
of cpumasks based on nr_vecs..
next prev parent reply other threads:[~2016-08-31 16:38 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-29 10:53 blk-mq: allow passing in an external queue mapping V2 Christoph Hellwig
2016-08-29 10:53 ` Christoph Hellwig
2016-08-29 10:53 ` [PATCH 1/7] blk-mq: don't redistribute hardware queues on a CPU hotplug event Christoph Hellwig
2016-08-29 10:53 ` Christoph Hellwig
2016-08-29 10:53 ` [PATCH 2/7] blk-mq: only allocate a single mq_map per tag_set Christoph Hellwig
2016-08-29 10:53 ` Christoph Hellwig
2016-08-29 10:53 ` [PATCH 3/7] blk-mq: remove ->map_queue Christoph Hellwig
2016-08-29 10:53 ` Christoph Hellwig
2016-08-29 10:53 ` [PATCH 4/7] blk-mq: allow the driver to pass in an affinity mask Christoph Hellwig
2016-08-29 10:53 ` Christoph Hellwig
2016-08-31 16:38 ` Keith Busch [this message]
2016-08-31 16:38 ` Keith Busch
2016-09-01 8:46 ` Christoph Hellwig
2016-09-01 8:46 ` Christoph Hellwig
2016-09-01 14:24 ` Keith Busch
2016-09-01 14:24 ` Keith Busch
2016-09-01 23:30 ` Keith Busch
2016-09-01 23:30 ` Keith Busch
2016-09-05 19:48 ` Christoph Hellwig
2016-09-05 19:48 ` Christoph Hellwig
2016-09-06 14:39 ` Keith Busch
2016-09-06 14:39 ` Keith Busch
2016-09-06 16:50 ` Christoph Hellwig
2016-09-06 16:50 ` Christoph Hellwig
2016-09-06 17:30 ` Keith Busch
2016-09-06 17:30 ` Keith Busch
2016-09-07 15:38 ` Thomas Gleixner
2016-09-07 15:38 ` Thomas Gleixner
2016-08-29 10:53 ` [PATCH 5/7] nvme: switch to use pci_alloc_irq_vectors Christoph Hellwig
2016-08-29 10:53 ` Christoph Hellwig
2016-08-29 10:53 ` [PATCH 6/7] nvme: remove the post_scan callout Christoph Hellwig
2016-08-29 10:53 ` Christoph Hellwig
2016-08-29 10:53 ` [PATCH 7/7] blk-mq: get rid of the cpumask in struct blk_mq_tags Christoph Hellwig
2016-08-29 10:53 ` Christoph Hellwig
2016-08-30 23:28 ` blk-mq: allow passing in an external queue mapping V2 Keith Busch
2016-08-30 23:28 ` Keith Busch
2016-09-01 8:45 ` Christoph Hellwig
2016-09-01 8:45 ` 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=20160831163852.GB5598@localhost.localdomain \
--to=keith.busch@intel.com \
--cc=axboe@fb.com \
--cc=hch@lst.de \
--cc=linux-block@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.