From a233b3fef0ef0048071145eb233becffbdf96d0f Mon Sep 17 00:00:00 2001 From: Yunhong Jiang Date: Tue, 18 Aug 2015 11:27:04 -0700 Subject: Make vfio MSI interrupt be non-threaded. Currently the vfio msi interrupt is kept as IRQ thread, this is not good for NFV scenerio because in NFV scenerio, we want to inject the interrupt to the guest asap. A threaded IRQ introduces schedule latency. However, this change is like a quick and dirty and may bring potential deadlock, because the spinlock_irqsave() from eventfd_signal() is preemptible in RT kernel, which should not be held on IRQ context. But changing it to be raw_spinlock is bad because it will increase the latency a lot if the eventfd is accessed by user space. The deadlock should be ok since for vfio MSI handler is purely kernel story and the lock is a per-eventfd lock and seems no one else is using it for the vfio msi scenario. Upstream status: discussion https://lkml.org/lkml/2015/10/26/764 Change-Id: Ie4405a5b568aa75ca8c3481eeeea228a486b9794 --- kernel/drivers/vfio/pci/vfio_pci_intrs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'kernel/drivers/vfio/pci') diff --git a/kernel/drivers/vfio/pci/vfio_pci_intrs.c b/kernel/drivers/vfio/pci/vfio_pci_intrs.c index 1f577b4ac..a21d8e1e3 100644 --- a/kernel/drivers/vfio/pci/vfio_pci_intrs.c +++ b/kernel/drivers/vfio/pci/vfio_pci_intrs.c @@ -352,7 +352,7 @@ static int vfio_msi_set_vector_signal(struct vfio_pci_device *vdev, pci_write_msi_msg(irq, &msg); } - ret = request_irq(irq, vfio_msihandler, 0, + ret = request_irq(irq, vfio_msihandler, IRQF_NO_THREAD, vdev->ctx[vector].name, trigger); if (ret) { kfree(vdev->ctx[vector].name); -- cgit 1.2.3-korg