Build and run:
cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug
cmake --build build
# RUn:
./build/src/nvme_driverThis is a user space NVMe driver that supports NVMe base specification revision 2.3. The implemented driver is for memory-based NVMe devices. Message based NVMe controller is not implemented yet, though I'm not sure whether I will even add support for it :)
TODO:
PCI device discoveryBAR mappingcontroller reset/enableadmin queue setupIdentify ControllerIdentify NamespaceCreate I/O CQ/SQBasic read/write operationswrite + read "Hello world" at a LBA
- PRP construction (use PRP lists for data more than a memory page)
Polling completions- Implementing MSI-X Interrupts and benchmarking polling vs interrupts
- Asynchronous event notifications (AEN) implementation
A good abstraction over commands / queues / command execution (admin vs io)- not good yet, i will try to improve more
- Per-core queue pairs
- one queue pair per pinned thread + NUMA cores?
- one completion poller per core
- benchmark with different queue depths (1, 8, 32, 128)
- Controller memory buffer support
- Maybe turn this into a Linux loadable kernel module?
Benchmarking:
- Benchmark against Linux pread/write without kernel caching
- Benchmark against SPDK
TODO