From: Tiezhu Yang <yangtiezhu@loongson.cn>
To: Huacai Chen <chenhuacai@kernel.org>
Cc: Hengqi Chen <hengqi.chen@gmail.com>,
loongarch@lists.linux.dev, bpf@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 1/2] LoongArch: BPF: Make arena support depend on SCQ extension
Date: Thu, 5 Nov 2026 10:24:46 +0800 [thread overview]
Message-ID: <e43e0960-be3b-126e-1a79-35e56d821319@loongson.cn> (raw)
In-Reply-To: <64b8f867-029d-3cdb-7896-1229a076e25c@loongson.cn>
On 11/4/26 9:06 PM, Tiezhu Yang wrote:
> On 11/4/26 5:54 PM, Huacai Chen wrote:
...
> Personally, I feel Approach 1 represents the pure semantic intent
> better, whereas Approach 2 looks more aesthetically pleasing.
>
> Which one do you prefer for the v2 patch?
FYI, here is another relevant discussion from the RISC-V ZACAS patch
where the same code aesthetic vs. semantic precision trade-off was
evaluated:
https://lore.kernel.org/bpf/3e7fb313-021a-49d0-9def-fd9f03e3c2bb@huawei.com/
> "Originally, I thought
> rv_ext_enabled(ZACAS) && IS_ENABLED(CONFIG_TOOLCHAIN_HAS_ZACAS)
> would make it more explicit, but system_has_cmpxchg128() seems
> to better capture what we were missing."
Using the generic system_has_cmpxchg128() directly mirrors the
precise condition defined in the MM core layer (mm/slab.h). It
prevents the JIT layer from over-relying on arch-specific
Kconfig/hardware knobs to mock generic allocator properties.
Therefore, I think using the generic #ifdef form is more robust
and keeps cross-architecture BPF JIT implementations symmetric.
Thanks,
Tiezhu
next prev parent reply other threads:[~2026-11-05 2:24 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-02 7:28 [PATCH v1 0/2] LoongArch: BPF: Fix arena and trampoline Tiezhu Yang
2026-11-02 7:28 ` [PATCH v1 1/2] LoongArch: BPF: Make arena support depend on SCQ extension Tiezhu Yang
2026-11-02 14:20 ` Huacai Chen
2026-11-03 2:24 ` Tiezhu Yang
2026-11-04 4:29 ` Huacai Chen
2026-11-04 6:58 ` Tiezhu Yang
2026-11-04 9:54 ` Huacai Chen
2026-11-04 13:06 ` Tiezhu Yang
2026-11-05 2:24 ` Tiezhu Yang [this message]
2026-11-04 10:17 ` George Guo
2026-11-05 1:50 ` Tiezhu Yang
2026-11-02 7:28 ` [PATCH v1 2/2] LoongArch: BPF: Use beqz and bnez instructions for trampoline Tiezhu Yang
2026-11-02 7:53 ` bot+bpf-ci
2026-11-03 2:27 ` Tiezhu Yang
2026-11-06 14:45 ` Huacai Chen
2026-11-07 2:16 ` Tiezhu Yang
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=e43e0960-be3b-126e-1a79-35e56d821319@loongson.cn \
--to=yangtiezhu@loongson.cn \
--cc=bpf@vger.kernel.org \
--cc=chenhuacai@kernel.org \
--cc=hengqi.chen@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=loongarch@lists.linux.dev \
/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®