]> www.infradead.org Git - qemu-nvme.git/commit
hw/nvme: support irq(de)assertion with eventfd
authorJinhao Fan <fanjinhao21s@ict.ac.cn>
Sat, 27 Aug 2022 09:12:55 +0000 (17:12 +0800)
committerKlaus Jensen <k.jensen@samsung.com>
Thu, 8 Jun 2023 19:15:39 +0000 (21:15 +0200)
commita1d3cefb049bbd314d773a698b5f8794eab0a71d
tree831d4a6714de4a198efc823a2dd3ddee4104e2c7
parent76e3d2f9adf9fc3454164cb56f4936d5b04d39bb
hw/nvme: support irq(de)assertion with eventfd

When the new option 'x-irq-eventfd' is turned on, the IO emulation code
signals an eventfd when it want to (de)assert an irq. The main loop
eventfd handler does the actual irq (de)assertion. This paves the way
for iothread support since QEMU's interrupt emulation is not thread
safe.

Asserting and deasseting irqs with eventfd has some performance
implications. For small queue depth it increases request latency, but
for large queue depth it effectively coalesces irqs.

Comparision (KIOPS):

QD            1   4  16  64
QEMU         38 123 210 329
irq-eventfd  32 106 240 364

Signed-off-by: Jinhao Fan <fanjinhao21s@ict.ac.cn>
Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
hw/nvme/ctrl.c
hw/nvme/nvme.h
hw/nvme/trace-events