From: Vinod Koul <vkoul@kernel.org>
To: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org,
Uros Bizjak <ubizjak@gmail.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>, Dave Jiang <dave.jiang@intel.com>
Subject: Re: [PATCH] dmaengine:idxd: Use local64_try_cmpxchg in perfmon_pmu_event_update
Date: Wed, 02 Aug 2023 00:15:04 +0530 [thread overview]
Message-ID: <169091550434.69468.5073669723336926533.b4-ty@kernel.org> (raw)
In-Reply-To: <20230703145346.5206-1-ubizjak@gmail.com>
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
prev parent reply other threads:[~2023-08-01 18:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-03 14:52 Uros Bizjak
2023-07-05 14:53 ` Dave Jiang
2023-07-10 21:28 ` Tom Zanussi
2023-08-01 18:45 ` Vinod Koul [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=169091550434.69468.5073669723336926533.b4-ty@kernel.org \
--to=vkoul@kernel.org \
--cc=dave.jiang@intel.com \
--cc=dmaengine@vger.kernel.org \
--cc=fenghua.yu@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ubizjak@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®