From: Eduard Zingerman <eddyz87@gmail.com>
To: Donglin Peng <dolinux.peng@gmail.com>,
Alexei Starovoitov <alexei.starovoitov@gmail.com>,
Andrii Nakryiko <andrii.nakryiko@gmail.com>,
Ihor Solodrai <ihor.solodrai@linux.dev>
Cc: bot+bpf-ci@kernel.org, Alexei Starovoitov <ast@kernel.org>,
zhangxiaoqin@xiaomi.com, LKML <linux-kernel@vger.kernel.org>,
bpf <bpf@vger.kernel.org>,
Alan Maguire <alan.maguire@oracle.com>,
Song Liu <song@kernel.org>, pengdonglin <pengdonglin@xiaomi.com>,
Andrii Nakryiko <andrii@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Martin KaFai Lau <martin.lau@kernel.org>,
Yonghong Song <yonghong.song@linux.dev>,
Chris Mason <clm@meta.com>
Subject: Re: [PATCH v5 6/7] btf: Add lazy sorting validation for binary search
Date: Mon, 10 Nov 2025 12:44:21 -0800 [thread overview]
Message-ID: <854a2c2ceaa52f1ad26fb803d1ad5668fd3200b3.camel@gmail.com> (raw)
In-Reply-To: <CAErzpmtViehGv3uLMFwv5bnRJi4HJu=wE6an6S0Gv2up3vncgA@mail.gmail.com>
On Mon, 2025-11-10 at 09:42 +0800, Donglin Peng wrote:
[...]
> [[Resending in plain text format - previous HTML email was rejected]
>
> Thanks for the feedback. Based on the previous discussions, I plan
> to implement the following changes in the next version:
>
> 1. Modify the btf__permute interface to adopt the ID map approach, as
> suggested by Andrii.
>
> 2. Remove the lazy sort check and move the verification to the BTF
> parsing phase. This addresses two concerns: potential race conditions
> with write operations and const-cast issues. The overhead is negligible
> (approximately 1.4ms for vmlinux BTF).
>
> 3. Invoke the btf__permute interface to implement BTF sorting in resolve_btfids.
>
> I welcome any further suggestions.
Hi Donglin,
I think this summarizes the discussion pretty well.
One thing to notice about (2): if sorting is done by resolve_btfids,
there is no need to check for BTF being sorted in vmlinux BTF.
So, maybe it's a good idea to skip this check for it, as Alexei suggested
(but not for programs BTF).
Thanks,
Eduard.
next prev parent reply other threads:[~2025-11-10 20:44 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-06 13:19 [PATCH v5 0/7] BTF performance optimizations with permutation and binary search Donglin Peng
2025-11-06 13:19 ` [PATCH v5 1/7] libbpf: Extract BTF type remapping logic into helper function Donglin Peng
2025-11-06 13:19 ` [PATCH v5 2/7] libbpf: Add BTF permutation support for type reordering Donglin Peng
2025-11-06 13:47 ` bot+bpf-ci
2025-11-07 7:12 ` Donglin Peng
2025-11-06 13:19 ` [PATCH v5 3/7] libbpf: Optimize type lookup with binary search for sorted BTF Donglin Peng
2025-11-06 13:40 ` bot+bpf-ci
2025-11-07 7:29 ` Donglin Peng
2025-11-06 13:19 ` [PATCH v5 4/7] libbpf: Implement lazy sorting validation for binary search optimization Donglin Peng
2025-11-06 13:19 ` [PATCH v5 5/7] btf: Optimize type lookup with binary search Donglin Peng
2025-11-06 13:19 ` [PATCH v5 6/7] btf: Add lazy sorting validation for " Donglin Peng
2025-11-06 13:47 ` bot+bpf-ci
2025-11-07 7:08 ` Donglin Peng
2025-11-07 18:19 ` Eduard Zingerman
2025-11-07 18:54 ` Alexei Starovoitov
2025-11-07 18:58 ` Eduard Zingerman
2025-11-07 19:01 ` Alexei Starovoitov
2025-11-07 19:51 ` Eduard Zingerman
2025-11-10 1:42 ` Donglin Peng
2025-11-10 20:44 ` Eduard Zingerman [this message]
2025-11-11 2:07 ` Donglin Peng
2025-11-06 13:19 ` [PATCH v5 7/7] selftests/bpf: Add test cases for btf__permute functionality Donglin Peng
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=854a2c2ceaa52f1ad26fb803d1ad5668fd3200b3.camel@gmail.com \
--to=eddyz87@gmail.com \
--cc=alan.maguire@oracle.com \
--cc=alexei.starovoitov@gmail.com \
--cc=andrii.nakryiko@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bot+bpf-ci@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=clm@meta.com \
--cc=daniel@iogearbox.net \
--cc=dolinux.peng@gmail.com \
--cc=ihor.solodrai@linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.lau@kernel.org \
--cc=pengdonglin@xiaomi.com \
--cc=song@kernel.org \
--cc=yonghong.song@linux.dev \
--cc=zhangxiaoqin@xiaomi.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