Re: [PATCH] iommu/iova: Replace cmpxchg with xchg in queue_iova

2020-09-04 Thread Joerg Roedel
Hi Robin, On Fri, Sep 04, 2020 at 10:58:14AM +0100, Robin Murphy wrote: > On 2020-09-04 10:37, Joerg Roedel wrote: > > Adding Robin. > > Did you miss that I've reviewed this already? :) > > https://lore.kernel.org/linux-iommu/3afcc7b2-0bfb-b79c-513f-1beb66c5f...@arm.com/ Hmm, that mail wasn't i

Re: [PATCH] iommu/iova: Replace cmpxchg with xchg in queue_iova

2020-09-04 Thread Robin Murphy
Hi Joerg, On 2020-09-04 10:37, Joerg Roedel wrote: Adding Robin. Did you miss that I've reviewed this already? :) https://lore.kernel.org/linux-iommu/3afcc7b2-0bfb-b79c-513f-1beb66c5f...@arm.com/ Robin. On Thu, Aug 27, 2020 at 04:43:54PM +0800, Shaokun Zhang wrote: From: Yuqi Jin The pe

Re: [PATCH] iommu/iova: Replace cmpxchg with xchg in queue_iova

2020-09-04 Thread Joerg Roedel
Adding Robin. On Thu, Aug 27, 2020 at 04:43:54PM +0800, Shaokun Zhang wrote: > From: Yuqi Jin > > 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_cm

Re: [PATCH] iommu/iova: Replace cmpxchg with xchg in queue_iova

2020-08-27 Thread Robin Murphy
On 2020-08-27 09:43, Shaokun Zhang wrote: From: Yuqi Jin 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 tha

[PATCH] iommu/iova: Replace cmpxchg with xchg in queue_iova

2020-08-27 Thread Shaokun Zhang
From: Yuqi Jin 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