DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Marat Khalili <qm2k21@gmail.com>
To: Nick Hudson <nhudson@akamai.com>
Cc: Wathsala Vithanage <wathsala.vithanage@arm.com>,
	Konstantin Ananyev <konstantin.ananyev@huawei.com>,
	dev@dpdk.org
Subject: Re: [PATCH 3/3] bpf/arm64: detect atomics at build time or runtime
Date: Sat, 5 Dec 2026 18:31:10 +0000	[thread overview]
Message-ID: <7c1122a9-f985-4e22-9554-4d280bbf7983@gmail.com> (raw)
In-Reply-To: <20261130163306.11116-4-nhudson@akamai.com>

On 30/11/2026 16:33, Nick Hudson wrote:
> Use LSE instructions when __ARM_FEATURE_ATOMICS or
> RTE_ARM_FEATURE_ATOMICS is defined. Otherwise, check runtime CPU flags
> before selecting LSE instructions for JIT-generated code.
>
> Signed-off-by: Nick Hudson <nhudson@akamai.com>

Hi, thank you for working on this. I can ack the code, but not the 
commit message or (missing) comments. The patch changes the current 
behaviour in a meaningful but counterintuitive way. Understanding it 
needs some analysis and may confuse some poor soul trying to figure out 
in the middle of the night why DPDK executes atomic instructions in the 
place it previously didn't.

Firstly, it would be nice if commit message clearly stated the change in 
behaviour: generate JIT atomic instructions based on runtime 
detection even if RTE_ARM_FEATURE_ATOMICS is disabled.

Secondly, it should explain the problem the patch is solving. Something 
along the lines of target alone being insufficient to guarantee the 
atomics availability for some values, LL/SC loops having 
forward-progress issues under contention, behaviour commonality with the 
rest of the platform (if it actually does the same already), yada yada. 
Short comment inside has_atomics would help too, maybe (not sure) even a 
release note. Searching mailing lists for answers should be the last 
resort IMO.

I would also love to know how practically relevant having atomic eBPF 
atomics in a armv8-a generic build is in 2027+, what prevents us from 
just building for armv8.1-a. I'm not claiming it's not relevant, just 
want to make sure it's not just a "nice to have" tweaking.

      parent reply	other threads:[~2026-12-05 18:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-30 16:33 [PATCH 0/3] arm64: use LSE atomics when available Nick Hudson
2026-11-30 16:33 ` [PATCH 1/3] mailmap: add new contributor Nick Hudson
2026-11-30 16:33 ` [PATCH 2/3] eal: select 128-bit CAS by LSE support Nick Hudson
2026-11-30 16:33 ` [PATCH 3/3] bpf/arm64: detect atomics at build time or runtime Nick Hudson
2026-12-01 10:57   ` Konstantin Ananyev
2026-12-01 13:11     ` Hudson, Nick
2026-12-05 18:31   ` Marat Khalili [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=7c1122a9-f985-4e22-9554-4d280bbf7983@gmail.com \
    --to=qm2k21@gmail.com \
    --cc=dev@dpdk.org \
    --cc=konstantin.ananyev@huawei.com \
    --cc=nhudson@akamai.com \
    --cc=wathsala.vithanage@arm.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