On Fri, Mar 22, 2019 at 07:54:50AM +0000, Felipe Franciosi wrote: > > > > Note though that SPDK doesn't support sharing the device between host and > > the > > guests, it takes over the nvme device, thus it makes the kernel nvme driver > > unbind from it. > > That is absolutely true. However, I find it not to be a problem in practice. > > Hypervisor products, specially those caring about performance, efficiency and > fairness, will dedicate NVMe devices for a particular purpose (eg. vDisk > storage, cache, metadata) and will not share these devices for other use > cases. That's because these products want to deterministically control the > performance aspects of the device, which you just cannot do if you are > sharing the device with a subsystem you do not control.
I don't know, it sounds like you've traded kernel syscalls for IPC, and I don't think one performs better than the other. > For scenarios where the device must be shared and such fine grained control > is not required, it looks like using the kernel driver with io_uring offers > very good performance with flexibility. NVMe's IO Determinism features provide fine grained control for shared devices. It's still uncommon to find hardware supporting that, though.