diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-21 11:54:28 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-21 11:54:28 +0000 |
commit | e6918187568dbd01842d8d1d2c808ce16a894239 (patch) | |
tree | 64f88b554b444a49f656b6c656111a145cbbaa28 /src/spdk/doc/virtio.md | |
parent | Initial commit. (diff) | |
download | ceph-upstream/18.2.2.tar.xz ceph-upstream/18.2.2.zip |
Adding upstream version 18.2.2.upstream/18.2.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/spdk/doc/virtio.md')
-rw-r--r-- | src/spdk/doc/virtio.md | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/spdk/doc/virtio.md b/src/spdk/doc/virtio.md new file mode 100644 index 000000000..ae498f23e --- /dev/null +++ b/src/spdk/doc/virtio.md @@ -0,0 +1,30 @@ +# Virtio driver {#virtio} + +# Introduction {#virtio_intro} + +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. + +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 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 @ref bdev_config_virtio_blk. +These modules will export generic SPDK block devices usable by any SPDK application. + +# 2MB hugepages {#virtio_2mb} + +vhost-user specification puts a limitation on the number of "memory regions" used (8). +Each region corresponds to one file descriptor, and DPDK - as SPDK's memory allocator - +uses one file per hugepage by default. So *by default* this makes SPDK Virtio practical +with only 1GB hugepages. To run an SPDK app using Virtio initiator with 2MB hugepages +it is required to pass '-g' command-line option . This forces DPDK to create a single +non-physically-contiguous hugetlbfs file for all its memory. |