iommu/iova: Optimize iova_magazine_alloc()
authorZhen Lei <thunder.leizhen@huawei.com>
Fri, 21 Apr 2023 07:24:21 +0000 (15:24 +0800)
committerJoerg Roedel <jroedel@suse.de>
Mon, 22 May 2023 15:09:51 +0000 (17:09 +0200)
commit5d62bacc059bb4f783e1d2ad88874abb6056f404
tree043ae8b9a2d5a2db9a974d80c9a190b6bdfb70a0
parent44c026a73be8038f03dbdeef028b642880cf1511
iommu/iova: Optimize iova_magazine_alloc()

Only the member 'size' needs to be initialized to 0. Clearing the array
pfns[], which is about 1 KiB in size, not only wastes time, but also
causes cache pollution.

Acked-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Link: https://lore.kernel.org/r/20230421072422.869-1-thunder.leizhen@huawei.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/iova.c