diff options
author | Lu Baolu <baolu.lu@linux.intel.com> | 2025-05-13 11:07:36 +0800 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2025-05-16 08:49:27 +0200 |
commit | f93b4ac5929a5754fc4edba26b43d0c9fa57d576 (patch) | |
tree | c800a3f4daeed3af7e5fdb8329019616eac9da0a /scripts/lib/kdoc/kdoc_files.py | |
parent | 6f5dc7658094610debe2fad1b09a2034e14857b1 (diff) |
iommu/vt-d: Use ida to manage domain id
Switch the intel iommu driver to use the ida mechanism for managing domain
IDs, replacing the previous fixed-size bitmap.
The previous approach allocated a bitmap large enough to cover the maximum
number of domain IDs supported by the hardware, regardless of the actual
number of domains in use. This led to unnecessary memory consumption,
especially on systems supporting a large number of iommu units but only
utilizing a small number of domain IDs.
The ida allocator dynamically manages the allocation and freeing of integer
IDs, only consuming memory for the IDs that are currently in use. This
significantly optimizes memory usage compared to the fixed-size bitmap.
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/20250430021135.2370244-2-baolu.lu@linux.intel.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'scripts/lib/kdoc/kdoc_files.py')
0 files changed, 0 insertions, 0 deletions