numam-spdk/lib/bdev
Dariusz Stojaczyk 03b12a98b2 bdev/virtio: support event index
This fixes intermittent failures with QEMU's virtio-scsi-pci
device.

Apparently, from time to time QEMU enters a broken state in
which it doesn't turn off the NO_NOTIFY flag. This flag should
be set only for the period of time virtqueues are being processed,
but QEMU makes it set all the time. This makes us not signal any
I/O submissions - SPDK thinks the device is currently processing
notifications so it will pick up our I/O automatically, but in
realitly it won't and we end up with a deadlock.

I believe kernel virtio driver doesn't hit this issue because of
event index feature. If negotiated, the NO_NOTIFY flag won't be
used at all. Initial tests show that the issue is indeed gone
with this patch.

Event index for SPDK virtio is not particularly useful when using
a poll-mode device, but it doesn't do any harm. It can be further
optimized in the future, but macro-benchmarks don't show any
performance difference compared with the legacy notification
handling so there's no hurry.

Change-Id: I46e8ab0da170780fcdc0dd239208670ee5ed6357
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/415591
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-07-02 19:17:13 +00:00
..
aio rpc/bdev: construct RPC return a string instead array 2018-06-22 21:12:43 +00:00
error bdev: add delete_error_bdev call 2018-06-22 17:24:05 +00:00
gpt thread: Replace #include of io_channel.h with thread.h 2018-06-12 15:24:07 +00:00
iscsi bdev/iscsi: Add unmap support for iscsi initiator 2018-06-28 18:19:52 +00:00
lvol rpc/bdev: construct RPC return a string instead array 2018-06-22 21:12:43 +00:00
malloc rpc/bdev: construct RPC return a string instead array 2018-06-22 21:12:43 +00:00
null rpc/bdev: construct RPC return a string instead array 2018-06-22 21:12:43 +00:00
nvme bdev/nvme: update NS bdevs after NS attribute notice event 2018-06-28 17:46:41 +00:00
passthru rpc/bdev: construct RPC return a string instead array 2018-06-22 21:12:43 +00:00
pmem rpc/bdev: construct RPC return a string instead array 2018-06-22 21:12:43 +00:00
rbd rpc/bdev: construct RPC return a string instead array 2018-06-22 21:12:43 +00:00
rpc bdev: encapsulate private members of spdk_bdev 2018-06-26 20:04:07 +00:00
split thread: Replace #include of io_channel.h with thread.h 2018-06-12 15:24:07 +00:00
virtio bdev/virtio: support event index 2018-07-02 19:17:13 +00:00
bdev.c bdev: Make an internal version of spdk_bdev_io_type_supported 2018-06-28 18:17:02 +00:00
Makefile bdev/pmem: change all NVML strings to PMDK 2018-04-07 00:07:57 -04:00
part.c bdev: Rename spdk_internal/bdev.h to spdk/bdev_module.h 2018-05-25 16:02:22 +00:00
scsi_nvme.c bdev: move error union to internal spdk_bdev_io struct 2018-06-26 20:04:07 +00:00
vtune.c bdev: disable new GCC 7 warning in VTune code 2018-03-19 15:58:15 -04:00