Re: [PATCH v3 0/3] genirq/vfio: Introduce update_irq_devid and optimize VFIO irq ops

From: luoben
Date: Tue Aug 20 2019 - 11:51:41 EST



å 2019/8/20 äå11:22, Alex Williamson åé:
On Tue, 20 Aug 2019 12:03:50 +0800
luoben <luoben@xxxxxxxxxxxxxxxxx> wrote:

å 2019/8/20 äå4:51, Alex Williamson åé:
On Thu, 15 Aug 2019 21:02:58 +0800
Ben Luo <luoben@xxxxxxxxxxxxxxxxx> wrote:
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 adds more latency,
but also increases the risk of losing interrupt, which may lead to a
VM hung forever in waiting for IO completion
What guest environment is generating this? Typically I don't see that
Windows or Linux guests bounce the interrupt configuration much.
Thanks,

Alex
By tracing centos5u8 on host, I found it keep masking and unmasking
interrupt like this:

[1566032533709879] index:28 irte_hi:000000010004a601
irte_lo:adb54bc000b98001
[1566032533711242] index:28 irte_hi:0000000000000000
irte_lo:0000000000000000
[1566032533711258] index:28 irte_hi:000000000004a601
irte_lo:00003fff00ac002d
[1566032533711269] index:28 irte_hi:000000000004a601
irte_lo:00003fff00ac002d
[snip]
"[1566032533720007]" is timestamp in Îs, so centos5u8 tiggers 30+ irte
modification within 10ms
Ok, that matches my understanding that only very old guests behave in
this manner. It's a curious case to optimize as RHEL5 is in extended
life-cycle support, with regular maintenance releases ending 2+ years
ago. Thanks,

Alex

But repeatedly set interrupt affinity in a new version guest can also cause the problem.


Thanks,

ÂÂÂ Ben