]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
iommu/iova: Optimise attempts to allocate iova from 32bit address range
authorGanapatrao Kulkarni <ganapatrao.kulkarni@cavium.com>
Wed, 5 Sep 2018 04:27:36 +0000 (09:57 +0530)
committerJoerg Roedel <jroedel@suse.de>
Tue, 25 Sep 2018 08:18:27 +0000 (10:18 +0200)
commitbee60e94a1e20ec0b8ffdafae270731d8fda4551
tree4bccce9ad467acc31c8a127ff57d06947f8c72d7
parent6bf4ca7fbc85d80446ac01c0d1d77db4d91a6d84
iommu/iova: Optimise attempts to allocate iova from 32bit address range

As an optimisation for PCI devices, there is always first attempt
been made to allocate iova from SAC address range. This will lead
to unnecessary attempts, when there are no free ranges
available. Adding fix to track recently failed iova address size and
allow further attempts, only if requested size is lesser than a failed
size. The size is updated when any replenish happens.

Reviewed-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Ganapatrao Kulkarni <ganapatrao.kulkarni@cavium.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/iova.c
include/linux/iova.h