From: "Kumar Kartikeya Dwivedi" <memxor@gmail.com>
To: "Emil Tsalapatis" <etsal@meta.com>, "Changwoo Min" <changwoo@igalia.com>
Cc: "Daniel Borkmann" <daniel@iogearbox.net>,
"Alexei Starovoitov" <ast@kernel.org>,
"Andrii Nakryiko" <andrii@kernel.org>,
"Eduard Zingerman" <eddyz87@gmail.com>,
"Shuah Khan" <shuah@kernel.org>,
"Emil Tsalapatis" <emil@etsalapatis.com>,
"Martin KaFai Lau" <martin.lau@linux.dev>,
"Song Liu" <song@kernel.org>,
"Yonghong Song" <yonghong.song@linux.dev>,
"Jiri Olsa" <jolsa@kernel.org>, <bpf@vger.kernel.org>,
<sched-ext@lists.linux.dev>, <linux-kselftest@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <kernel-dev@igalia.com>
Subject: Re: [PATCH] selftests/bpf: Remove duplicate copies of the arena spinlock qnodes
Date: Mon, 17 Aug 2026 20:05:23 +0200 [thread overview]
Message-ID: <DKRF25OV39DP.2WZYYSKICG68H@gmail.com> (raw)
In-Reply-To: <CAMe2y=Gm9K3cwsM7Sff3ZaKani3z4tVUQv9u1KzbetJF8OrW=g@mail.gmail.com>
On Mon Aug 17, 2026 at 7:14 PM CEST, Emil Tsalapatis wrote:
> On Mon, Aug 17, 2026 at 9:02 AM Changwoo Min <changwoo@igalia.com> wrote:
>>
>> >
>> Hi Daniel,
>>
>> On 8/17/26 6:05 PM, Daniel Borkmann wrote:
>> > On 8/3/26 2:18 AM, Changwoo Min wrote:
>> >> bpf_arena_spin_lock.h defines its 64KB qnodes array in the header, so
>> >> every translation unit including it emits a copy. __weak makes them all
>> >> resolve to one instance, but bpftool gen object merges only the symbols
>> >> and concatenates each input's .addr_space.1 bytes, leaving the surplus
>> >> copies unreferenced in the linked object.
>> >>
>> >> libarena links ten such units, so nine copies were dead weight (bytes):
>> >>
>> >> object before after
>> >> -----------------------------------------------------
>> >> .addr_space.1 in libarena.bpf.o 676200 86376
>> >> libarena.skel.h 2100123 892371
>> >> libarena_asan.skel.h 2641124 1466477
>> >>
>> >> Declare qnodes in the header and let each program define it once:
>> >> libarena in src/common.bpf.c, and the arena_spin_lock test beside the
>> >> lock it guards.
>> >>
>> >> Tested with test_progs -t arena_spin_lock and -t libarena.
>> >>
>> >> Signed-off-by: Changwoo Min <changwoo@igalia.com>
>
> Hi Changwoo,
>
> Sorry for the late reply, for the next version feel free to add:
>
> Reviewed-by: Emil Tsalapatis <emil@etsalapatis.com>
>
Added the tag to v2 and applied, thanks.
>> > This doesn't apply cleanly, could you respin against latest bpf-next?
>>
>> Sure. I will send the v2 rebased on the HEAD of the the bpf-next tree soon.
>>
>> Regards.
>> Changwoo Min
>>
>> >
>> > Thanks,
>> > Daniel
>> >
>>
>>
prev parent reply other threads:[~2026-08-17 18:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-03 0:18 [PATCH] selftests/bpf: Remove duplicate copies of the arena spinlock qnodes Changwoo Min
2026-08-13 4:38 ` Kumar Kartikeya Dwivedi
2026-08-17 9:05 ` Daniel Borkmann
2026-08-17 16:00 ` Changwoo Min
2026-08-17 17:14 ` Emil Tsalapatis
2026-08-17 18:05 ` Kumar Kartikeya Dwivedi [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=DKRF25OV39DP.2WZYYSKICG68H@gmail.com \
--to=memxor@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=changwoo@igalia.com \
--cc=daniel@iogearbox.net \
--cc=eddyz87@gmail.com \
--cc=emil@etsalapatis.com \
--cc=etsal@meta.com \
--cc=jolsa@kernel.org \
--cc=kernel-dev@igalia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=martin.lau@linux.dev \
--cc=sched-ext@lists.linux.dev \
--cc=shuah@kernel.org \
--cc=song@kernel.org \
--cc=yonghong.song@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;
as well as URLs for NNTP newsgroup(s).