Skip to content

Commit a7f58b9

Browse files
Keith BuschLorenzo Pieralisi
authored andcommitted
PCI: vmd: White list for fast interrupt handlers
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 <keith.busch@intel.com> [lorenzo.pieralisi@arm.com: changelog] Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Acked-by: Jon Derrick: <jonathan.derrick@intel.com>
1 parent ce397d2 commit a7f58b9

File tree

1 file changed

+12
-1
lines changed
  • drivers/pci/controller

1 file changed

+12
-1
lines changed

drivers/pci/controller/vmd.c

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,9 +197,20 @@ static struct vmd_irq_list *vmd_next_irq(struct vmd_dev *vmd, struct msi_desc *d
197197
int i, best = 1;
198198
unsigned long flags;
199199

200-
if (pci_is_bridge(msi_desc_to_pci_dev(desc)) || vmd->msix_count == 1)
200+
if (vmd->msix_count == 1)
201201
return &vmd->irqs[0];
202202

203+
/*
204+
* White list for fast-interrupt handlers. All others will share the
205+
* "slow" interrupt vector.
206+
*/
207+
switch (msi_desc_to_pci_dev(desc)->class) {
208+
case PCI_CLASS_STORAGE_EXPRESS:
209+
break;
210+
default:
211+
return &vmd->irqs[0];
212+
}
213+
203214
raw_spin_lock_irqsave(&list_lock, flags);
204215
for (i = 1; i < vmd->msix_count; i++)
205216
if (vmd->irqs[i].count < vmd->irqs[best].count)

0 commit comments

Comments
 (0)