Skip to content

genirq/vfio: Introduce irq_update_devid() and optimize VFIO irq ops

Ben Luo lkml 6 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v6 Latest3 patches 4 repliesIn review
  2. v53 patches 2 repliesSuperseded
  3. v43 patches 5 repliesSuperseded
Earlier versions · 3
VersionPostedPatchesRepliesStatus
v33 patches11 repliesSuperseded
v23 patches0 repliesSuperseded
v12 patches4 repliesSuperseded

Changes in v6 from the cover letter

- Patch 3: remove an error log to avoid potential DDoS attacking _ Patch 3: fix typo in comment

Patches in v6 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3genirq: enhance error recovery code in free irqkernel/irq/manage.c+18 -120 replies
2/3genirq: introduce irq_update_devid()include/linux/interrupt.h kernel/irq/manage.c+78 -00 replies
3/3vfio/pci: make use of irq_update_devid() and optimize irq opsdrivers/vfio/pci/vfio_pci_intrs.c+81 -370 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v6 yet.

Read the v6 thread

Cover letter [PATCH v6 0/3] genirq/vfio: Introduce irq_update_devid() and optimize VFIO irq ops

Currently, VFIO takes a free-then-request-irq way to do interrupt affinity setting and masking/unmasking for a VM with device passthru via VFIO. Sometimes it only changes the cookie data of irqaction or even changes nothing. The free-then-request-irq not only adds more latency, but also increases the risk of losing interrupt, which may lead to a VM hang forever in waiting for IO completion

This patchset solved the issue by:
Patch 2 introduces irq_update_devid() to only update dev_id of irqaction Patch 3 make use of this function and optimize irq operations in VFIO

changes from v5:
- Patch 3: remove an error log to avoid potential DDoS attacking _ Patch 3: fix typo in comment

changes from v4:
- Patch 3: follow the previous behavior to disable interrupt on error path
- Patch 3: do irqbypass registration before update or free the interrupt
- Patch 3: add more comments

changes from v3:
- Patch 2: rename the new function to irq_update_devid()
- Patch 2: use disbale_irq() to avoid a twist for threaded interrupt
- ALL: amend commit messages and code comments

changes from v2:
- reformat to avoid quoted string split across lines and etc.

changes from v1:
- add Patch 1 to enhance error recovery etc. in free irq per tglx's comments
- enhance error recovery code and debugging info in irq_update_devid
- use __must_check in external referencing of this function
- use EXPORT_SYMBOL_GPL for irq_update_devid
- reformat code of patch 3 for better readability

Ben Luo (3):
genirq: enhance error recovery code in free irq
genirq: introduce irq_update_devid()
vfio/pci: make use of irq_update_devid() and optimize irq ops

 drivers/vfio/pci/vfio_pci_intrs.c | 118 ++++++++++++++++++++++++++------------
 include/linux/interrupt.h         |   3 +
 kernel/irq/manage.c               | 105 +++++++++++++++++++++++++++++----
 3 files changed, 177 insertions(+), 49 deletions(-)
Signature · 1 line
1.8.3.1