qemu/hw/nvme
Jinhao Fan 2e53b0b450 hw/nvme: Use ioeventfd to handle doorbell updates
Add property "ioeventfd" which is enabled by default. When this is
enabled, updates on the doorbell registers will cause KVM to signal
an event to the QEMU main loop to handle the doorbell updates.
Therefore, instead of letting the vcpu thread run both guest VM and
IO emulation, we now use the main loop thread to do IO emulation and
thus the vcpu thread has more cycles for the guest VM.

Since ioeventfd does not tell us the exact value that is written, it is
only useful when shadow doorbell buffer is enabled, where we check
for the value in the shadow doorbell buffer when we get the doorbell
update event.

IOPS comparison on Linux 5.19-rc2: (Unit: KIOPS)

qd           1   4  16  64
qemu        35 121 176 153
ioeventfd   41 133 258 313

Changes since v3:
 - Do not deregister ioeventfd when it was not enabled on a SQ/CQ

Signed-off-by: Jinhao Fan <fanjinhao21s@ict.ac.cn>
Reviewed-by: Klaus Jensen <k.jensen@samsung.com>
Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
2022-07-15 10:40:33 +02:00
..
ctrl.c hw/nvme: Use ioeventfd to handle doorbell updates 2022-07-15 10:40:33 +02:00
dif.c hw/nvme: add new command abort case 2022-06-03 21:48:24 +02:00
dif.h hw/nvme: 64-bit pi support 2022-03-03 09:30:21 +01:00
Kconfig hw/nvme: move nvme emulation out of hw/block 2021-05-17 09:19:00 +02:00
meson.build hw/nvme: move nvme emulation out of hw/block 2021-05-17 09:19:00 +02:00
ns.c hw/nvme: force nvme-ns param 'shared' to false if no nvme-subsys node 2022-07-15 10:40:33 +02:00
nvme.h hw/nvme: Use ioeventfd to handle doorbell updates 2022-07-15 10:40:33 +02:00
subsys.c hw/nvme: Add support for Secondary Controller List 2022-06-23 23:24:28 +02:00
trace-events hw/nvme: Add trace events for shadow doorbell buffer 2022-07-15 10:40:33 +02:00
trace.h hw/nvme: move nvme emulation out of hw/block 2021-05-17 09:19:00 +02:00