Message ID | 20160816193418.GA10555@localhost (mailing list archive) |
---|---|
State | New, archived |
Delegated to: | Bjorn Helgaas |
Headers | show |
On Tue, Aug 16, 2016 at 02:34:18PM -0500, Bjorn Helgaas wrote: > Speaking of affinity, the original documentation said "By default this > function will spread the interrupts around the available CPUs". After > these patches, you have to pass PCI_IRQ_AFFINITY to get that behavior. > Are you planning to have drivers use > > pci_alloc_irq_vectors(dev, 1, nvec, PCI_IRQ_ALL_TYPES | PCI_IRQ_AFFINITY) > > to explicitly ask for affinity? Yes, at least for now. During my mass conversion attempts I found enough drivers that don't use MSI-X for spreading queues over CPUs but instead for different kinds of interrupts. I'd been to much in my NVMe and RDMA world earlier to assume everyone else would do something that sensible.. > I applied these to for-linus with the intent of merging them for v4.8. > I fixed a couple typos in the first one as shown below. Thanks. -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/Documentation/PCI/MSI-HOWTO.txt b/Documentation/PCI/MSI-HOWTO.txt index 8faf14a..cd9c9f6 100644 --- a/Documentation/PCI/MSI-HOWTO.txt +++ b/Documentation/PCI/MSI-HOWTO.txt @@ -96,9 +96,9 @@ if it can't meet the minimum number of vectors. The flags argument is used to specify which type of interrupt can be used by the device and the driver (PCI_IRQ_LEGACY, PCI_IRQ_MSI, PCI_IRQ_MSIX). -A conveniant short-hand (PCI_IRQ_ALL_TYPES) is also avaiable to ask for -any possible kind of interrupt. If the PCI_IRQ_NOAFFINITY flag is set, -pci_alloc_irq_vectors will spread the interrupts around the available CPUs. +A convenient short-hand (PCI_IRQ_ALL_TYPES) is also available to ask for +any possible kind of interrupt. If the PCI_IRQ_AFFINITY flag is set, +pci_alloc_irq_vectors() will spread the interrupts around the available CPUs. To get the Linux IRQ numbers passed to request_irq() and free_irq() and the vectors, use the following function: @@ -150,8 +150,7 @@ the single MSI mode for a device. It could be done by passing two 1s as goto out_err; Some devices might not support using legacy line interrupts, in which case -the PCI_IRQ_NOLEGACY flag can be used to fail the request if the platform -can't provide MSI or MSI-X interrupts: +the driver can specify that only MSI or MSI-X is acceptable: nvec = pci_alloc_irq_vectors(pdev, 1, nvec, PCI_IRQ_MSI | PCI_IRQ_MSIX); if (nvec < 0)