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@xxxxxxxxxxxxxxx>
Signed-off-by: Lu Baolu<baolu.lu@xxxxxxxxxxxxxxx>
Signed-off-by: Zhenzhong Duan<zhenzhong.duan@xxxxxxxxx>
---
v2: avoid getting cache tag struct from list head (Baolu)
drivers/iommu/intel/cache.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)