numam-spdk/lib
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
..
bdev bdev/virtio: support event index 2018-07-02 19:17:13 +00:00
blob blobstore: Save the original size of the disk. 2018-06-28 17:58:31 +00:00
blobfs thread: Replace #include of io_channel.h with thread.h 2018-06-12 15:24:07 +00:00
conf conf: don't strdup name if section already exist 2018-05-17 17:13:19 +00:00
copy copy/ioat: Add scan_ioat_copy_engine RPC 2018-06-14 03:54:42 +00:00
cunit include: Move the remainder of the code base to stdinc.h 2017-05-08 13:20:36 -07:00
env_dpdk env: introduce spdk_memzone_reserve_aligned 2018-07-02 19:13:23 +00:00
event lib: return error in case of start_fn is null in spdk_app_start() 2018-06-27 20:52:37 +00:00
ioat ioat: split FILL tasks on hugepage boundary 2018-07-02 18:23:15 +00:00
iscsi iscsi: Refactor update of datain_flag in spdk_iscsi_transfer_in() 2018-06-26 23:31:17 +00:00
json json: Add spdk_json_decode_uint16 2018-06-05 21:30:02 +00:00
jsonrpc jsonrpc: fix closed connection hadling 2018-06-08 18:11:18 +00:00
log app: reword -t option help string 2018-06-11 23:37:11 +00:00
lvol blobstore: add decouple parent function 2018-06-21 22:50:03 +00:00
nbd thread: Replace #include of io_channel.h with thread.h 2018-06-12 15:24:07 +00:00
net net: split sock abstraction into lib/sock 2018-06-22 17:09:57 +00:00
nvme nvme/pcie: merge physically contiguous SGEs 2018-07-02 19:13:23 +00:00
nvmf nvme_spec: add VWC flush broadcast bits (TP 4035) 2018-06-26 22:51:37 +00:00
rocksdb thread: Replace #include of io_channel.h with thread.h 2018-06-12 15:24:07 +00:00
rpc rpc: Add option to get_rpc_methods RPC to output only currently usable RPCs 2018-05-04 17:45:48 +00:00
scsi scsi: Use not pthread_self but spdk_get_thread for LUN affinity 2018-06-26 23:31:17 +00:00
sock net: split sock abstraction into lib/sock 2018-06-22 17:09:57 +00:00
thread thread: send message for completion with no channels 2018-06-28 17:39:55 +00:00
trace app,lib: fix checking mmap return value 2018-03-30 16:18:34 -04:00
ut_mock test/mock: add pthread_self 2017-09-19 17:15:15 -04:00
util thread: Move threading abstraction code out of util 2018-06-12 15:24:07 +00:00
vhost vhost: dump interrupt coalescing parameters in RPC info/config 2018-06-15 18:45:14 +00:00
virtio bdev/virtio: support event index 2018-07-02 19:17:13 +00:00
Makefile net: split sock abstraction into lib/sock 2018-06-22 17:09:57 +00:00