On Mon, Apr 04, 2022 at 07:27:11PM +0800, John Garry wrote: > Some low-level drivers may request DMA mappings whose IOVA length exceeds > that of the current rcache upper limit. > > This means that allocations for those IOVAs will never be cached, and > always must be allocated and freed from the RB tree per DMA mapping cycle. > This has a significant effect on performance, more so since commit > 4e89dce72521 ("iommu/iova: Retry from last rb tree node if iova search > fails"), as discussed at [0]. > > As a first step towards allowing the rcache range upper limit be > configured, hold this value in the IOVA rcache structure, and allocate > the rcaches separately. > > Delete macro IOVA_RANGE_CACHE_MAX_SIZE in case it's reused by mistake. > > [0] > https://lore.kernel.org/linux-iommu/20210129092120.1482-1-thunder.leiz...@huawei.com/ > > Signed-off-by: John Garry <john.ga...@huawei.com> > --- > drivers/iommu/iova.c | 20 ++++++++++---------- > include/linux/iova.h | 3 +++ > 2 files changed, 13 insertions(+), 10 deletions(-)
Acked-by: Will Deacon <w...@kernel.org> Will _______________________________________________ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization