]> xenbits.xensource.com Git - osstest/seabios.git/commit
nvme: Pass large I/O requests as PRP lists
authorAlexander Graf <graf@amazon.com>
Wed, 30 Sep 2020 21:10:55 +0000 (23:10 +0200)
committerKevin O'Connor <kevin@koconnor.net>
Wed, 28 Oct 2020 19:18:29 +0000 (15:18 -0400)
commit01f2736cc905df7abfe4a4160d986b49eb607e7a
tree3019507f0553300a3282e35a5368e174b2bdb3df
parent23258d39ffee2bdd975a80058899caab3e4ed304
nvme: Pass large I/O requests as PRP lists

Today, we split every I/O request into at most 4kb chunks and wait for these
requests to finish. We encountered issues where the backing storage is network
based, so every I/O request needs to go over the network with associated
latency cost. A few ms of latency when loading 100MB initrd in 4kb chunks
does add up.

NVMe implements a feature to allow I/O requests spanning multiple pages,
called PRP lists. This patch takes larger I/O operations and checks if
they can be directly passed to the NVMe backing device as PRP list.
At least for grub, read operations can always be mapped directly into
PRP list items.

This reduces the number of I/O operations required during a typical boot
path by roughly a factor of 5.

Signed-off-by: Alexander Graf <graf@amazon.com>
src/hw/nvme-int.h
src/hw/nvme.c