3 ms·
> So there's no standardization on how to talk to devices at the hardware level. Some CPUs have protection systems, an "I/O MMU", and there have been various ch
by transpute 8y ago
> So there's no standardization on how to talk to devices at the hardware level. Some CPUs have protection systems, an "I/O MMU", and there have been various channel-like interfaces, especially from Intel, but they have never caught on.
From the paper:
> NVMe SSDs perform I/O faster than the OS can accept new I/O requests and notify their completion. Furthermore, the current POSIX AIO implementations in Linux are ugly and adhoc, and they have limited support from file systems. This has lead to new AIO interfaces that eliminate system calls and leverage polling. However, polling for completion is not suitable for large I/O transfers.
AWS Nitro SR-IOV I/O virtualization [1] uses Intel VT-d Posted Interrupts [2] to avoid polling, but this CPU feature is price-segmented to Xeon E5 and higher. For other CPUs, polling [3] is necessary to achieve high IOPS with NVME. Intel and AMD should consider making this feature available on all CPUs, to support NVME and NVDIMM.
[1] SR-IOV: https://www.snia.org/sites/default/files/RonEmerick_PCI_Express_IO_Virtualization.pdf https://www.snia.org/sites/default/files/RonEmerick_PCI_Expr... & https://www.twosixlabs.com/running-thousands-of-kvm-guests-on-amazons-new-i3-metal-instances/ https://www.twosixlabs.com/running-thousands-of-kvm-guests-o...
[2] IOMMU: https://www.linux-kvm.org/images/7/70/2012-forum-nakajima_apicv.pdf https://www.linux-kvm.org/images/7/70/2012-forum-nakajima_ap...
[3] Polling: https://events.static.linuxfound.org/sites/events/files/slides/lemoal-nvme-polling-vault-2017-final_0.pdf https://events.static.linuxfound.org/sites/events/files/slid... & https://www.snia.org/sites/default/files/SDC/2018/presentations/Cloud_Storage/Yang_L_Zhu_D_Achieving_10-Million_IOPS_from_a_single_VM_on_Windows_Hyper-V.pdf https://www.snia.org/sites/default/files/SDC/2018/presentati...
- _msw_ 8y agoDisclosure: I work at AWS and played a part in building the Nitro system The Nitro system does use SR-IOV, and it can take advantage of hardware virtualization features like VT-d posted interrupts to lower interrupt virtualization overhead. But VT-d posted interrupts isn't a factor in avoiding polling. I'd go further to say that the Two Six Labs blog post has some inaccuracies, so I wouldn't depend on the information it contains much. Polling is often more efficient, and lower latency, than interrupt driven operation. If a CPU is mostly doing IO, polling for work can be a much better approach. Jens Axboe has been working on adding polling to the I/O stack for a while [1], and has recently added a new API for submitting I/O that is very promising [2] (25-33% performance improvements on I/O heavy workloads). [1] https://lwn.net/Articles/705315/ https://lwn.net/Articles/705315/ [2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=38e7571c07be01f9f19b355a9306a4e3d5cb0f5b https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/lin...
- _msw_ 8y agoSee also this thread: https://news.ycombinator.com/item?id=19843464 https://news.ycombinator.com/item?id=19843464