public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] iommu/vt-d: Use ida for domain ID management
@ 2025-04-30  2:11 Lu Baolu
  2025-04-30  2:11 ` [PATCH v2 1/2] iommu/vt-d: Use ida to manage domain id Lu Baolu
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Lu Baolu @ 2025-04-30  2:11 UTC (permalink / raw)
  To: Joerg Roedel, Will Deacon, Robin Murphy, Jason Gunthorpe,
	Kevin Tian
  Cc: iommu, linux-kernel, Lu Baolu

This converts the Intel iommu driver's domain ID management from a
fixed-size bitmap to the dynamic ida allocator. This improves memory
efficiency by only allocating resources for the domain IDs actually in
use, rather than the maximum possible number.

The also includes necessary cleanups after the ida conversion, including
locking adjustment for the ida.

---
Change log:
v2:
 - Drop the last patch which simplified the code with __free(). There
   needs a helper like xa_store_or_{reset,kfree}(). Thus I plan to put
   it a separated series with broader reviewers.

v1: https://lore.kernel.org/linux-iommu/20250423031020.2189546-1-baolu.lu@linux.intel.com/

Lu Baolu (2):
  iommu/vt-d: Use ida to manage domain id
  iommu/vt-d: Replace spin_lock with mutex to protect domain ida

 drivers/iommu/intel/dmar.c  |  4 ++
 drivers/iommu/intel/iommu.c | 90 ++++++++-----------------------------
 drivers/iommu/intel/iommu.h | 21 +++++++--
 3 files changed, 40 insertions(+), 75 deletions(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-05-12  6:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-30  2:11 [PATCH v2 0/2] iommu/vt-d: Use ida for domain ID management Lu Baolu
2025-04-30  2:11 ` [PATCH v2 1/2] iommu/vt-d: Use ida to manage domain id Lu Baolu
2025-05-06 17:29   ` Jason Gunthorpe
2025-04-30  2:11 ` [PATCH v2 2/2] iommu/vt-d: Replace spin_lock with mutex to protect domain ida Lu Baolu
2025-05-06 17:29   ` Jason Gunthorpe
2025-05-12  6:37 ` [PATCH v2 0/2] iommu/vt-d: Use ida for domain ID management Baolu Lu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox