From 36506448d430a5a123b4f5257117dc0b3af44dc0 Mon Sep 17 00:00:00 2001 From: Dariusz Stojaczyk Date: Mon, 26 Mar 2018 08:10:07 +0200 Subject: [PATCH] doc/virtio: minor updates Reflect three changes: * Virtio now works with Linux and QEMU vhost targets * The Virtio library was separated from bdev modules * Virtio Blk bdev module has been added Change-Id: I7d3075ca863a1142b3ddcc4d18e982f3b7c72202 Signed-off-by: Dariusz Stojaczyk Reviewed-on: https://review.gerrithub.io/405288 Tested-by: SPDK Automated Test System Reviewed-by: Pawel Wodkowski Reviewed-by: Daniel Verkamp Reviewed-by: Jim Harris --- doc/virtio.md | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/doc/virtio.md b/doc/virtio.md index d23ad5b83..1e2e2ba11 100644 --- a/doc/virtio.md +++ b/doc/virtio.md @@ -1,32 +1,26 @@ -# Virtio SCSI driver {#virtio} +# Virtio driver {#virtio} # Introduction {#virtio_intro} -Virtio SCSI driver is an initiator for SPDK @ref vhost application. The -driver allows any SPDK app to connect to another SPDK instance exposing -a vhost-scsi device. The driver will enumerate targets on the device (which acts -as a SCSI controller) and create *virtual* bdevs usable by any SPDK application. -Sending an I/O request to the Virtio SCSI bdev will put the request data into -a Virtio queue that is processed by the host SPDK app exposing the -controller. The host, after sending I/O to the real drive, will put the response -back into the Virtio queue. Then, the response is received by the Virtio SCSI -driver. +SPDK Virtio driver is a C library that allows communicating with Virtio devices. +It allows any SPDK application to become an initiator for (SPDK) vhost targets. -Virtio SCSI driver supports two different usage models: +The driver supports two different usage models: * PCI - This is the standard mode of operation when used in a guest virtual -machine, where QEMU has presented the virtio-scsi controller as a virtual -PCI device. -* User vhost - Can be used to connect to a vhost-scsi socket directly on the -same host. +machine, where QEMU has presented the virtio controller as a virtual PCI device. +* vhost-user - Can be used to connect to a vhost socket directly on the same host. The driver, just like the SPDK @ref vhost, is using pollers instead of standard interrupts to check for an I/O response. If used inside a VM, it bypasses interrupt and context switching overhead of QEMU and guest kernel, significantly boosting the overall I/O performance. +This Virtio library is currently used to implement two bdev modules: +@ref bdev_config_virtio_scsi and Virtio Blk. These modules will export generic +SPDK block devices usable by any other SPDK application. + # Limitations {#virtio_limitations} Current Virtio-SCSI implementation has a couple of limitations: * supports only up to 8 hugepages (implies only 1GB sized pages are practical) * single LUN per target - * only SPDK vhost-scsi controllers supported