[PATCH 0/2] introduce update_irq_devid and optimize VFIO irq ops

From: Ben Luo
Date: Thu Aug 08 2019 - 08:06:38 EST


Currently, VFIO takes a lot of free-then-request-irq actions whenever
a VM (with device passthru via VFIO) sets irq affinity or mask/unmask
irq. Those actions only change the cookie data of irqaction or even
change nothing. The free-then-request-irq not only add more latency,
but also increases the risk of losing interrupt, this may lead to a
VM hung forever in waiting IO completion

This patchset solved this issue by:
patch 1 introduces update_irq_devid to only update dev_id of irqaction
patch 2 make use of update_irq_devid and optimize irq operations in VFIO

Ben Luo (2):
genirq: introduce update_irq_devid()
vfio_pci: make use of update_irq_devid and optimize irq ops

drivers/vfio/pci/vfio_pci_intrs.c | 100 +++++++++++++++++++++++---------------
include/linux/interrupt.h | 3 ++
kernel/irq/manage.c | 74 ++++++++++++++++++++++++++++
3 files changed, 139 insertions(+), 38 deletions(-)

--
1.8.3.1