[lkml]   [2022]   [Jun]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subject[PATCH v3 00/11] iommu/vt-d: Optimize the use of locks
Hi folks,

This series tries to optimize the uses of two locks in the Intel IOMMU

- The intel_iommu::lock is used to protect the IOMMU resources shared by
devices. They include the IOMMU root and context tables, the pasid
tables and the domain IDs.
- The global device_domain_lock is used to protect the global and the
per-domain device tracking lists.

The optimization includes:

- Remove the unnecessary global device tracking list;
- Remove unnecessary locking;
- Reduce the scope of the lock as much as possible, that is, use the
lock only where necessary;
- The global lock is transformed into a local lock to improve the

This series is also available on github:

Your comments and suggestions are very appreciated.

Best regards,

Change log:

- Split reduction of lock ranges from changing irqsave.
- Fully initialize the dev_info before adding it to the list.
- Various code and comments refinement.

- Split the lock-free page walk issue into a new patch:
- Drop the conversion from spinlock to mutex and make this series
cleanup purpose only.
- Address several comments received during v1 review.

- Initial post.

Lu Baolu (11):
iommu/vt-d: debugfs: Remove device_domain_lock usage
iommu/vt-d: Remove clearing translation data in disable_dmar_iommu()
iommu/vt-d: Use pci_get_domain_bus_and_slot() in pgtable_walk()
iommu/vt-d: Unnecessary spinlock for root table alloc and free
iommu/vt-d: Replace spin_lock_irqsave() with spin_lock()
iommu/vt-d: Acquiring lock in domain ID allocation helpers
iommu/vt-d: Acquiring lock in pasid manipulation helpers
iommu/vt-d: Check device list of domain in domain free path
iommu/vt-d: Fold __dmar_remove_one_dev_info() into its caller
iommu/vt-d: Use device_domain_lock accurately
iommu/vt-d: Convert global spinlock into per domain lock

drivers/iommu/intel/iommu.h | 3 +-
drivers/iommu/intel/pasid.h | 1 +
drivers/iommu/intel/debugfs.c | 49 ++++---
drivers/iommu/intel/iommu.c | 248 ++++++++++------------------------
drivers/iommu/intel/pasid.c | 103 +++++++-------
drivers/iommu/intel/svm.c | 5 +-
6 files changed, 164 insertions(+), 245 deletions(-)


 \ /
  Last update: 2022-06-29 09:55    [W:0.122 / U:0.856 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site