Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
iommu: msm: Rewrite to improve clarity and performance
This scope of this driver's lock usage is extremely wide, leading to excessively long lock hold times. Additionally, an entire linked list is traversed for the sole purpose of trying to find a reason to invoke a BUG. These are the two most significant contributors to poor performance in this driver. Fix all of this by greatly reducing the scope of the locks used and by using atomic reader/writer locks. The superfluous linked list traversal is also gone, and the entire driver's code is refactored and improved for better cleanliness and performance. Note that ION must be modified to pass a known structure via the private dma_buf pointer, so that the iommu driver can prevent races when operating on the same buffer concurrently. This is the only way to eliminate said buffer races without hurting the iommu driver's performance. Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
- Loading branch information