iommu/iova: Replace cmpxchg with xchg in queue_iova
The performance of the atomic_xchg is better than atomic_cmpxchg because no comparison is required. While the value of @fq_timer_on can only be 0 or 1. Let's use atomic_xchg instead of atomic_cmpxchg here because we only need to check that the value changes from 0 to 1 or from 1 to 1. Signed-off-by: NYuqi Jin <jinyuqi@huawei.com> Signed-off-by: NShaokun Zhang <zhangshaokun@hisilicon.com> Reviewed-by: NRobin Murphy <robin.murphy@arm.com> Cc: Joerg Roedel <joro@8bytes.org> Link: https://lore.kernel.org/r/1598517834-30275-1-git-send-email-zhangshaokun@hisilicon.comSigned-off-by: NJoerg Roedel <jroedel@suse.de>
Showing
想要评论请 注册 或 登录