IOMMU: avoid lock contention in iova allocation
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest4 patches 9 repliesIn review
- v14 patches 9 repliesSuperseded
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | IOMMU: add a percpu cache for iova allocationdrivers/ include/ | +89 | 0 replies | |
| 2/4 | iommu: free_iova doesn't need lock twicedrivers/ | +37 | 0 replies | |
| 3/4 | intel-iommu: remove find_iova in unmap pathdrivers/ | +39 | 0 replies | |
| 4/4 | intel-iommu: do batch iova freedrivers/ drivers/ include/ | +44 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [PATCH V2 0/4]IOMMU: avoid lock contention in iova allocation
Hi,
iova alloc/free causes big lock contention, which could be easily demonstrated with iperf workload. Previously I posted a patchset:
http://lists.linuxfoundation.org/pipermail/iommu/2015-November/014984.html
the concern is it's not generic. This is another try for the issue. This version implements a per-cpu iova cache for small size DMA allocation (<= 64k), which should be generic enough and so we can do batch allocation. iova free could be easily batched too. With batch alloc/free, iova lock contention disappears. Performance result with this patchset is nearly the same as the previous one in the same test.
After this patchset, async_umap_flush_lock becomes the hotest lock in intel-iommu, but not very bad. That will be something we need work on in the future.
Thanks,
Shaohua
Shaohua Li (4):
IOMMU: add a percpu cache for iova allocation
iommu: free_iova doesn't need lock twice
intel-iommu: remove find_iova in unmap path
intel-iommu: do batch iova free
drivers/iommu/intel-iommu.c | 77 +++++++++++++------ drivers/iommu/iova.c | 177 +++++++++++++++++++++++++++++++++++--------- include/linux/iova.h | 10 +++ 3 files changed, 208 insertions(+), 56 deletions(-)
Signature · 1 line
2.4.6