[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <169091550434.69468.5073669723336926533.b4-ty@kernel.org>
Date: Wed, 02 Aug 2023 00:15:04 +0530
From: Vinod Koul <vkoul@...nel.org>
To: dmaengine@...r.kernel.org, linux-kernel@...r.kernel.org,
Uros Bizjak <ubizjak@...il.com>
Cc: Fenghua Yu <fenghua.yu@...el.com>,
Dave Jiang <dave.jiang@...el.com>
Subject: Re: [PATCH] dmaengine:idxd: Use local64_try_cmpxchg in
perfmon_pmu_event_update
On Mon, 03 Jul 2023 16:52:37 +0200, Uros Bizjak wrote:
> Use local64_try_cmpxchg instead of local64_cmpxchg (*ptr, old, new) == old
> in perfmon_pmu_event_update. x86 CMPXCHG instruction returns success in
> ZF flag, so this change saves a compare after cmpxchg (and related move
> instruction in front of cmpxchg).
>
> Also, try_cmpxchg implicitly assigns old *ptr value to "old" when cmpxchg
> fails. There is no need to re-read the value in the loop.
>
> [...]
Applied, thanks!
[1/1] dmaengine:idxd: Use local64_try_cmpxchg in perfmon_pmu_event_update
commit: cae701b9ccf128edea26982f73178087fc3ad180
Best regards,
--
~Vinod
Powered by blists - more mailing lists