Re: [PATCH v3 3/3] vfio_pci: make use of update_irq_devid and optimize irq ops

2019-08-22 Thread luoben
在 2019/8/20 下午11:27, Liu, Jiang 写道: On Aug 20, 2019, at 11:24 PM, luoben wrote: 在 2019/8/16 上午12:45, Thomas Gleixner 写道: On Thu, 15 Aug 2019, Ben Luo wrote: if (vdev->ctx[vector].trigger) { - free_irq(irq, vdev->ctx[vector].trigger); - irq_bypass_unr

Re: [PATCH v3 3/3] vfio_pci: make use of update_irq_devid and optimize irq ops

2019-08-20 Thread Liu, Jiang
> On Aug 20, 2019, at 11:24 PM, luoben wrote: > > > > 在 2019/8/16 上午12:45, Thomas Gleixner 写道: >> On Thu, 15 Aug 2019, Ben Luo wrote: >> >>> if (vdev->ctx[vector].trigger) { >>> - free_irq(irq, vdev->ctx[vector].trigger); >>> - irq_bypass_unregister_producer(&vdev->c

Re: [PATCH v3 3/3] vfio_pci: make use of update_irq_devid and optimize irq ops

2019-08-15 Thread Thomas Gleixner
On Thu, 15 Aug 2019, Ben Luo wrote: > if (vdev->ctx[vector].trigger) { > - free_irq(irq, vdev->ctx[vector].trigger); > - irq_bypass_unregister_producer(&vdev->ctx[vector].producer); > - kfree(vdev->ctx[vector].name); > - eventfd_ctx_put(vdev->ct

[PATCH v3 3/3] vfio_pci: make use of update_irq_devid and optimize irq ops

2019-08-15 Thread Ben Luo
When userspace (e.g. qemu) triggers a switch between KVM irqfd and userspace eventfd, only dev_id of irq action (i.e. the "trigger" in this patch's context) will be changed, but a free-then-request-irq action is taken in current code. And, irq affinity setting in VM will also trigger a free-then-re