From: Bart Van Assche <Bart.VanAssche-Sjgp3cTcYWE@public.gmane.org>
To: "linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org"
<dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
"sagi-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org"
<sagi-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>
Cc: "hch-jcswGhMUV9g@public.gmane.org"
<hch-jcswGhMUV9g@public.gmane.org>,
"linux-nvme-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org"
<linux-nvme-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>,
"leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org"
<leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
"saeedm-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org"
<saeedm-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
Subject: Re: [PATCH v7 for-4.13 6/7] block: Add rdma affinity based queue mapping helper
Date: Tue, 11 Jul 2017 22:13:40 +0000 [thread overview]
Message-ID: <1499811219.2586.45.camel@wdc.com> (raw)
In-Reply-To: <1499671054-23899-7-git-send-email-sagi-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>
On Mon, 2017-07-10 at 10:17 +0300, Sagi Grimberg wrote:
> +int blk_mq_rdma_map_queues(struct blk_mq_tag_set *set,
> + struct ib_device *dev, int first_vec)
> +{
> + const struct cpumask *mask;
> + unsigned int queue, cpu;
> +
> + if (set->nr_hw_queues > dev->num_comp_vectors)
> + goto fallback;
Should this perhaps have been "if (first_vec + set->nr_hw_queues >
dev->num_comp_vectors)"? Additionally, since the return value of
ib_get_vector_affinity() is tested inside the loop, can this test be left out?
> +
> + for (queue = 0; queue < set->nr_hw_queues; queue++) {
> + mask = ib_get_vector_affinity(dev, first_vec + queue);
> + if (!mask)
> + goto fallback;
> +
> + for_each_cpu(cpu, mask)
> + set->mq_map[cpu] = queue;
> + }
> +
> + return 0;
> +fallback:
> + return blk_mq_map_queues(set);
If you have to repost this patch, please insert a blank line above the
"fallback" label.
Thanks,
Bart.--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2017-07-11 22:13 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-10 7:17 [PATCH v7 for-4.13 0/7] Automatic affinity settings for nvme-rdma Sagi Grimberg
[not found] ` <1499671054-23899-1-git-send-email-sagi-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>
2017-07-10 7:17 ` [PATCH v7 for-4.13 1/7] mlx5: convert to generic pci_alloc_irq_vectors Sagi Grimberg
2017-07-10 7:17 ` [PATCH v7 for-4.13 2/7] mlx5e: don't assume anything on the irq affinity mappings of the device Sagi Grimberg
2017-07-10 7:17 ` [PATCH v7 for-4.13 3/7] mlx5: move affinity hints assignments to generic code Sagi Grimberg
2017-07-10 7:17 ` [PATCH v7 for-4.13 4/7] RDMA/core: expose affinity mappings per completion vector Sagi Grimberg
[not found] ` <1499671054-23899-5-git-send-email-sagi-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>
2017-07-11 22:07 ` Bart Van Assche
[not found] ` <1499810819.2586.43.camel-Sjgp3cTcYWE@public.gmane.org>
2017-07-12 10:35 ` Sagi Grimberg
2017-07-10 7:17 ` [PATCH v7 for-4.13 5/7] mlx5: support ->get_vector_affinity Sagi Grimberg
2017-07-10 7:17 ` [PATCH v7 for-4.13 6/7] block: Add rdma affinity based queue mapping helper Sagi Grimberg
[not found] ` <1499671054-23899-7-git-send-email-sagi-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>
2017-07-11 22:13 ` Bart Van Assche [this message]
[not found] ` <1499811219.2586.45.camel-Sjgp3cTcYWE@public.gmane.org>
2017-07-12 10:36 ` Sagi Grimberg
2017-07-10 7:17 ` [PATCH v7 for-4.13 7/7] nvme-rdma: use intelligent affinity based queue mappings Sagi Grimberg
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=1499811219.2586.45.camel@wdc.com \
--to=bart.vanassche-sjgp3ctcywe@public.gmane.org \
--cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=hch-jcswGhMUV9g@public.gmane.org \
--cc=leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=linux-nvme-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=saeedm-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org \
--cc=sagi-NQWnxTmZq1alnMjI0IkVqw@public.gmane.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox