]> Git Repo - linux.git/commitdiff
PCI: vmd: White list for fast interrupt handlers
authorKeith Busch <[email protected]>
Tue, 8 May 2018 16:00:22 +0000 (10:00 -0600)
committerLorenzo Pieralisi <[email protected]>
Thu, 28 Jun 2018 16:25:33 +0000 (17:25 +0100)
Devices with slow interrupt handlers are significantly harming
performance when their interrupt vector is shared with a fast device.

Create a class code white list for devices with known fast interrupt
handlers and let all other devices share a single vector so that they
don't interfere with performance.

At the moment, only the NVM Express class code is on the list, but more
may be added if VMD users desire to use other low-latency devices in
these domains.

Signed-off-by: Keith Busch <[email protected]>
[[email protected]: changelog]
Signed-off-by: Lorenzo Pieralisi <[email protected]>
Acked-by: Jon Derrick: <[email protected]>
drivers/pci/controller/vmd.c

index 942b64fc7f1f0041267ad16d0488c1fb9f7e08a3..fd2dbd7eed7bca808f44470ba060725acc1ec061 100644 (file)
@@ -197,9 +197,20 @@ static struct vmd_irq_list *vmd_next_irq(struct vmd_dev *vmd, struct msi_desc *d
        int i, best = 1;
        unsigned long flags;
 
-       if (pci_is_bridge(msi_desc_to_pci_dev(desc)) || vmd->msix_count == 1)
+       if (vmd->msix_count == 1)
                return &vmd->irqs[0];
 
+       /*
+        * White list for fast-interrupt handlers. All others will share the
+        * "slow" interrupt vector.
+        */
+       switch (msi_desc_to_pci_dev(desc)->class) {
+       case PCI_CLASS_STORAGE_EXPRESS:
+               break;
+       default:
+               return &vmd->irqs[0];
+       }
+
        raw_spin_lock_irqsave(&list_lock, flags);
        for (i = 1; i < vmd->msix_count; i++)
                if (vmd->irqs[i].count < vmd->irqs[best].count)
This page took 0.059017 seconds and 4 git commands to generate.