Skip to content

Commit

Permalink
iommu: msm: Rewrite to improve clarity and performance
Browse files Browse the repository at this point in the history
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
kerneltoast committed Aug 22, 2019
1 parent ac67deb commit 4ceb632
Show file tree
Hide file tree
Showing 4 changed files with 143 additions and 381 deletions.
Loading

0 comments on commit 4ceb632

Please sign in to comment.