linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v5 0/3] genirq/vfio: Introduce irq_update_devid() and optimize VFIO irq ops
@ 2019-08-30  8:41 Ben Luo
  2019-08-30  8:41 ` [PATCH v5 1/3] genirq: enhance error recovery code in free irq Ben Luo
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Ben Luo @ 2019-08-30  8:41 UTC (permalink / raw)
  To: tglx, alex.williamson; +Cc: linux-kernel, tao.ma, gerry, nanhai.zou

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 hung 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 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 | 124 ++++++++++++++++++++++++++------------
 include/linux/interrupt.h         |   3 +
 kernel/irq/manage.c               | 105 ++++++++++++++++++++++++++++----
 3 files changed, 183 insertions(+), 49 deletions(-)

-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-08-31  4:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-30  8:41 [PATCH v5 0/3] genirq/vfio: Introduce irq_update_devid() and optimize VFIO irq ops Ben Luo
2019-08-30  8:41 ` [PATCH v5 1/3] genirq: enhance error recovery code in free irq Ben Luo
2019-08-30  8:41 ` [PATCH v5 2/3] genirq: introduce irq_update_devid() Ben Luo
2019-08-30  8:42 ` [PATCH v5 3/3] vfio/pci: make use of irq_update_devid and optimize irq ops Ben Luo
2019-08-30 20:06   ` Alex Williamson
2019-08-31  4:38     ` Ben Luo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).