All of lore.kernel.org
 help / color / mirror / Atom feed
From: hch@lst.de (Christoph Hellwig)
Subject: [PATCH 6/8] pci: provide sensible irq vector alloc/free routines
Date: Sun, 1 May 2016 20:01:49 +0200	[thread overview]
Message-ID: <20160501180149.GA11131@lst.de> (raw)
In-Reply-To: <20160429211638.GB28261@localhost>

On Fri, Apr 29, 2016@04:16:39PM -0500, Bjorn Helgaas wrote:
> Sorry to be a pedant, but can you please edit the subject to be:
> 
>   PCI: Provide sensible IRQ vector alloc/free routines

sure.

> 
> so it matches the drivers/pci convention?
> 
> I like this idea a lot.  The MSI-X/MSI interfaces are much better than
> they used to be, and I think this would be another significant
> improvement.  What do you think, Alexander?  Here's the whole series
> in case you don't have it handy:
> http://lkml.kernel.org/r/1460770552-31260-1-git-send-email-hch at lst.de

FYI, I spent some time trying to convert more drivers to this, and
I think we'll need an additional flag to skip MSI or MSI-X as there
is plenty of hardware claiming support in the capabilities flag,
but not actually supporting one of them.

> > Hide all the MSI-X vs MSI vs legacy bullshit, and provide an array of
> > interrupt vectors in the pci_dev structure, and ensure we get proper
> > interrupt affinity by default.
> 
> This patch doesn't do anything for affinity by itself.

it used to in an earlier incarnation before I split that out.  But yes,
the changelog should be updated.

> > +	vecs = pci_enable_msix_range_wrapper(pdev, irqs, nr_vecs);
> > +	if (vecs <= 0) {
> > +		vecs = pci_enable_msi_range(pdev, 1, min(nr_vecs, 32));
> 
> I don't see one, but seems like we should have a #define for this
> "32".  I guess pci_enable_msi_range() already protects itself, so this
> min() is probably not strictly necessary anyway.

Ok, I'll take a look an will either remove it entirely or add an
define depending on the audit.

WARNING: multiple messages have this Message-ID (diff)
From: Christoph Hellwig <hch@lst.de>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: Christoph Hellwig <hch@lst.de>,
	tglx@linutronix.de, linux-block@vger.kernel.org,
	linux-pci@vger.kernel.org, linux-nvme@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	Alexander Gordeev <agordeev@redhat.com>
Subject: Re: [PATCH 6/8] pci: provide sensible irq vector alloc/free routines
Date: Sun, 1 May 2016 20:01:49 +0200	[thread overview]
Message-ID: <20160501180149.GA11131@lst.de> (raw)
In-Reply-To: <20160429211638.GB28261@localhost>

On Fri, Apr 29, 2016 at 04:16:39PM -0500, Bjorn Helgaas wrote:
> Sorry to be a pedant, but can you please edit the subject to be:
> 
>   PCI: Provide sensible IRQ vector alloc/free routines

sure.

> 
> so it matches the drivers/pci convention?
> 
> I like this idea a lot.  The MSI-X/MSI interfaces are much better than
> they used to be, and I think this would be another significant
> improvement.  What do you think, Alexander?  Here's the whole series
> in case you don't have it handy:
> http://lkml.kernel.org/r/1460770552-31260-1-git-send-email-hch@lst.de

FYI, I spent some time trying to convert more drivers to this, and
I think we'll need an additional flag to skip MSI or MSI-X as there
is plenty of hardware claiming support in the capabilities flag,
but not actually supporting one of them.

> > Hide all the MSI-X vs MSI vs legacy bullshit, and provide an array of
> > interrupt vectors in the pci_dev structure, and ensure we get proper
> > interrupt affinity by default.
> 
> This patch doesn't do anything for affinity by itself.

it used to in an earlier incarnation before I split that out.  But yes,
the changelog should be updated.

> > +	vecs = pci_enable_msix_range_wrapper(pdev, irqs, nr_vecs);
> > +	if (vecs <= 0) {
> > +		vecs = pci_enable_msi_range(pdev, 1, min(nr_vecs, 32));
> 
> I don't see one, but seems like we should have a #define for this
> "32".  I guess pci_enable_msi_range() already protects itself, so this
> min() is probably not strictly necessary anyway.

Ok, I'll take a look an will either remove it entirely or add an
define depending on the audit.

  reply	other threads:[~2016-05-01 18:01 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-16  1:35 RFC: automatic interrupt affinity for MSI/MSI-X capable devices Christoph Hellwig
2016-04-16  1:35 ` Christoph Hellwig
2016-04-16  1:35 ` [PATCH 1/8] device: Add irq affinity hint cpumask pointer Christoph Hellwig
2016-04-16  1:35   ` Christoph Hellwig
2016-04-16  1:35 ` [PATCH 2/8] genirq: Make use of dev->irq_affinity Christoph Hellwig
2016-04-16  1:35   ` Christoph Hellwig
2016-04-16  1:35 ` [PATCH 3/8] genirq: add a helper spread an affinity mask for MSI/MSI-X vectors Christoph Hellwig
2016-04-16  1:35   ` Christoph Hellwig
2016-04-16  1:35 ` [PATCH 4/8] genirq: add a helper to program the pre-set affinity mask into the controller Christoph Hellwig
2016-04-16  1:35   ` Christoph Hellwig
2016-04-16  1:35 ` [PATCH 5/8] blk-mq: allow the driver to pass in an affinity mask Christoph Hellwig
2016-04-16  1:35   ` Christoph Hellwig
2016-04-16  1:35 ` [PATCH 6/8] pci: provide sensible irq vector alloc/free routines Christoph Hellwig
2016-04-16  1:35   ` Christoph Hellwig
2016-04-29 21:16   ` Bjorn Helgaas
2016-04-29 21:16     ` Bjorn Helgaas
2016-05-01 18:01     ` Christoph Hellwig [this message]
2016-05-01 18:01       ` Christoph Hellwig
2016-05-02 13:11       ` Bjorn Helgaas
2016-05-02 13:11         ` Bjorn Helgaas
2016-05-02 14:42         ` Christoph Hellwig
2016-05-02 14:42           ` Christoph Hellwig
2016-05-02 15:29           ` Bjorn Helgaas
2016-05-02 15:29             ` Bjorn Helgaas
2016-05-03 21:19             ` Christoph Hellwig
2016-05-03 21:19               ` Christoph Hellwig
2016-05-03 21:37               ` Bjorn Helgaas
2016-05-03 21:37                 ` Bjorn Helgaas
2016-04-16  1:35 ` [PATCH 7/8] pci: spread interrupt vectors in pci_alloc_irq_vectors Christoph Hellwig
2016-04-16  1:35   ` Christoph Hellwig
2016-04-18  8:30   ` Thomas Gleixner
2016-04-18  8:30     ` Thomas Gleixner
2016-04-16  1:35 ` [PATCH 8/8] nvme: switch to use pci_alloc_irq_vectors Christoph Hellwig
2016-04-16  1:35   ` 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=20160501180149.GA11131@lst.de \
    --to=hch@lst.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 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.