Skip to content
Commit ba328f82 authored by Yuqi Jin's avatar Yuqi Jin Committed by Joerg Roedel
Browse files

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: default avatarYuqi Jin <jinyuqi@huawei.com>
Signed-off-by: default avatarShaokun Zhang <zhangshaokun@hisilicon.com>
Reviewed-by: default avatarRobin 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.com


Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
parent 4604393c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment