bbe3ee8dc5
This patch replaces the formerly fixed 2 KiB data alignment within the packet-stream buffer by a server-defined alignment. This has two benefits. First, when using block servers that provide small block sizes like 512 bytes, we avoid fragmenting the packet-stream buffer, which occurs when aligning 512-byte requests at 2 KiB boundaries. This reduces meta data costs for the packet-stream allocator and also allows fitting more requests into the buffer. Second, block drivers with alignment constraints dictated by the hardware can now pass those constraints to the client, thereby easing the use of zero-copy DMA directly into the packet stream. The alignment is determined by the Block::Session_client at construction time and applied by the Block::Session_client::alloc_packet method. Block-session clients should always use this method, not the 'alloc_packet' method of the packet stream (tx source) directly. The latter merely applies a default alignment of 2 KiB. At the server side, the alignment is automatically checked by block/component.h (old API) and block/request_stream.h (new API). Issue #3274 |
||
---|---|---|
.. | ||
main.cc | ||
pci.h | ||
README | ||
target.mk | ||
util.h |
This directory contains the implementation of a NVMe driver component. Brief ===== The driver supports PCIe NVMe devices matching at least revision 1.1 of the NVMe specification. For now it only supports one name space and uses one completion and one submission queue to handle all I/O requests; one request is limited to 1MiB of data. It lacks any name space management functionality. Configuration ============= The following config illustrates how the driver is configured: !<start name="nvme_drv"> ! <resource name="ram" quantum="8M"/> ! <provides><service name="Block"/></provides> ! <config> ! <policy label_prefix="client1" writeable="yes"/> ! </config> !</start> Report ====== The driver supports reporting of active name spaces, which can be enabled via the configuration 'report' sub-node: !<report namespace="yes"/> The report structure is depicted by the following example: !<controller model="QEMU NVMe Ctrl" serial="FNRD"> ! <namespace id="0" block_count="32768" block_size="512"/> !</controller>