]> www.infradead.org Git - users/jedix/linux-maple.git/commit
iommu/vt-d: Link cache tags of same iommu unit together
authorZhenzhong Duan <zhenzhong.duan@intel.com>
Tue, 7 Jan 2025 02:17:46 +0000 (10:17 +0800)
committerJoerg Roedel <jroedel@suse.de>
Tue, 7 Jan 2025 08:30:53 +0000 (09:30 +0100)
commitacf5d49aaf862333a7139adff52a6b153af2853a
treef33117456c3bb859c6079e32965cb8075763aeef
parentcf08ca81d08a04b3b304e8fb4e052f323a09783d
iommu/vt-d: Link cache tags of same iommu unit together

Cache tag invalidation requests for a domain are accumulated until a
different iommu unit is found when traversing the cache_tags linked list.
But cache tags of same iommu unit can be distributed in the linked list,
this make batched flush less efficient. E.g., one device backed by iommu0
is attached to a domain in between two devices attaching backed by iommu1.

Group cache tags together for same iommu unit in cache_tag_assign() to
maximize the performance of batched flush.

Co-developed-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Link: https://lore.kernel.org/r/20241219054358.8654-1-zhenzhong.duan@intel.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/intel/cache.c