[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <172746273791.131348.18071682105497639956.b4-ty@kernel.org>
Date: Fri, 27 Sep 2024 20:45:37 +0200
From: Carlos Maiolino <cem@...nel.org>
To: linux-xfs@...r.kernel.org, linux-kernel@...r.kernel.org,
Uros Bizjak <ubizjak@...il.com>
Cc: Christoph Hellwig <hch@...radead.org>,
Chandan Babu R <chandan.babu@...cle.com>,
"Darrick J. Wong" <djwong@...nel.org>
Subject: Re: [PATCH v3] xfs: Use try_cmpxchg() in
xlog_cil_insert_pcp_aggregate()
On Mon, 23 Sep 2024 14:22:17 +0200, Uros Bizjak wrote:
> Use !try_cmpxchg instead of cmpxchg (*ptr, old, new) != old in
> xlog_cil_insert_pcp_aggregate(). x86 CMPXCHG instruction returns
> success in ZF flag, so this change saves a compare after 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 to xfs-6.12-rc2, thanks!
[1/1] xfs: Use try_cmpxchg() in xlog_cil_insert_pcp_aggregate()
commit: 6e19fd40d755a64f271687a21cd304ecba41a571
Best regards,
--
Carlos Maiolino <cem@...nel.org>
Powered by blists - more mailing lists