diff options
author | Leon Romanovsky <leonro@nvidia.com> | 2024-02-11 13:49:27 +0200 |
---|---|---|
committer | Leon Romanovsky <leon@kernel.org> | 2024-03-05 15:30:23 +0200 |
commit | 487474092c7dec05049da571e870d9b2a665c45b (patch) | |
tree | dfffeaa0941acfdb657485a036aaa7c2d3e01ffe | |
parent | a5d61e76896667a7e9e5385e6f6c8b2d571dd820 (diff) | |
download | linux-rdma-dma-split.tar.gz |
cover-letter: Split IOMMU DMA mapping operation to two stepsdma-split
The DMA mapping operation performs two steps at one same time: allocates
IOVA space and actually maps DMA pages to that space. This one shot
operation works perfectly for non-complex scenarios, where callers use
that DMA API in control path when they setup hardware.
However in more complex scenarios, when DMA mapping is needed in data
path and especially when some sort of specific datatype is involved,
such one shot approach has its drawbacks.
That approach pushes developers to introduce new DMA APIs for specific
datatype. For example existing scatter-gather mapping functions, or
latest Chuck's RFC series to add biovec related DMA mapping [1] and
probably struct folio will need it too.
These advanced DMA mapping APIs are needed to calculate IOVA size to
allocate it as one chunk and some sort of offset calculations to know
which part of IOVA to map.
Instead of teaching DMA to know these specific datatypes, let's separate
existing DMA mapping routine to two steps and give an option to advanced
callers (subsystems) perform all calculations internally in advance and
map pages later when it is needed.
In this series, three users are converted and each of such conversion
presents different positive gain:
1. RDMA simplifies and speeds up its pagefault handling for
on-demand-paging (ODP) mode.
2. VFIO PCI live migration code saves huge chunk of memory.
3. NVMe PCI avoids intermediate SG table manipulation and operates
directly on BIOs.
Thanks
[1] https://lore.kernel.org/all/169772852492.5232.17148564580779995849.stgit@klimt.1015granger.net
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
0 files changed, 0 insertions, 0 deletions