From: Christoph Hellwig <hch@infradead.org>
To: Himanshu Madhani <himanshu.madhani@cavium.com>
Cc: martin.petersen@oracle.com, linux-scsi@vger.kernel.org
Subject: Re: [PATCH v2 4/5] qla2xxx: Add Block Multi Queue functionality.
Date: Thu, 1 Dec 2016 02:25:37 -0800 [thread overview]
Message-ID: <20161201102537.GA7894@infradead.org> (raw)
In-Reply-To: <1480537497-16429-5-git-send-email-himanshu.madhani@cavium.com>
> - pci_disable_msix(ha->pdev);
> + pci_free_irq_vectors(ha->pdev);
Please make the switch to pci_alloc_irq_vectors / pci_free_irq_vectors
a se[arate patch.
> + ret = pci_alloc_irq_vectors(ha->pdev,
> + MIN_MSIX_COUNT, ha->msix_count, PCI_IRQ_MSIX);
And for proper blk-mq support you must use PCI_IRQ_AFFINITY to get
the affinity right.
> /* Recalculate queue values */
> - if (ql2xmqsupport) {
> + if (ha->mqiobase && ql2xmqsupport) {
Where is that change coming from?
> cpus = num_online_cpus();
> ha->max_req_queues = (ha->msix_count - 1 > cpus) ?
> (cpus + 1) : (ha->msix_count - 1);
> - ha->max_rsp_queues = ha->max_req_queues;
>
> /* ATIOQ needs 1 vector. That's 1 less QPair */
> if (QLA_TGT_MODE_ENABLED())
> ha->max_req_queues--;
And don't do your own look at online cpus and queue spreading, that's
what PCI_IRQ_AFFINITY and blk_mq_pci_map_queues are for.
> "MSI: Enabled.\n");
> @@ -3273,11 +3261,10 @@ struct qla_init_msix_entry {
>
> if (ha->flags.msix_enabled)
> qla24xx_disable_msix(ha);
> - else if (ha->flags.msi_enabled) {
> - free_irq(ha->pdev->irq, rsp);
> - pci_disable_msi(ha->pdev);
> - } else
> - free_irq(ha->pdev->irq, rsp);
> + else {
> + free_irq(pci_irq_vector(ha->pdev, 0), rsp);
> + pci_free_irq_vectors(ha->pdev);
> + }
Please also kill off qla24xx_disable_msix, and have a single
callsite that iterates over all vectors and finally calls
pci_free_irq_vectors.
> - if (ql2xmqsupport) {
> + if (ql2xmqsupport && ha->max_qpairs) {
Where does this come from?
next prev parent reply other threads:[~2016-12-01 10:25 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-30 20:24 [PATCH v2 0/5] qla2xxx: Features updates for driver Himanshu Madhani
2016-11-30 20:24 ` [PATCH v2 1/5] qla2xxx: Only allow operational MBX to proceed during RESET Himanshu Madhani
2016-12-01 7:56 ` Hannes Reinecke
2016-11-30 20:24 ` [PATCH v2 2/5] qla2xxx: Fix mailbox command timeout due to starvation Himanshu Madhani
2016-12-01 7:58 ` Hannes Reinecke
2016-12-01 16:47 ` Madhani, Himanshu
2016-11-30 20:24 ` [PATCH v2 3/5] qla2xxx: Add multiple queue pair functionality Himanshu Madhani
2016-12-01 8:39 ` Hannes Reinecke
2016-12-02 17:37 ` Madhani, Himanshu
2016-11-30 20:24 ` [PATCH v2 4/5] qla2xxx: Add Block Multi Queue functionality Himanshu Madhani
2016-12-01 10:25 ` Christoph Hellwig [this message]
2016-12-02 18:27 ` Madhani, Himanshu
2016-11-30 20:24 ` [PATCH v2 5/5] qla2xxx: Fix Target mode handling with Multiqueue changes Himanshu Madhani
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=20161201102537.GA7894@infradead.org \
--to=hch@infradead.org \
--cc=himanshu.madhani@cavium.com \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
/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;
as well as URLs for NNTP newsgroup(s).