BPF List
 help / color / mirror / Atom feed
From: "Alexei Starovoitov" <alexei.starovoitov@gmail.com>
To: "Kumar Kartikeya Dwivedi" <memxor@gmail.com>, <bpf@vger.kernel.org>
Cc: <daniel@iogearbox.net>, <andrii@kernel.org>, <eddyz87@gmail.com>
Subject: Re: [PATCH bpf-next v3 00/14] bpf: A stack in arena
Date: Wed, 04 Nov 2026 18:02:02 +0000	[thread overview]
Message-ID: <DMMMGML15GX5.3GT3JKTNCB748@gmail.com> (raw)
In-Reply-To: <DMM94NDU83WN.337PKDJT31SOE@gmail.com>

On Tue, Nov 03, 2026 at 11:35 PM Kumar Kartikeya Dwivedi <memxor@gmail.com> wrote:
>> The price against libarena with __arena: two times more casts, JITed code
>> +18%, arena_malloc() +7%.
>
> Could you elaborate on this? Are the extra casts due to the fact that globals,
> heaps, and locals on the stack are moving to arena memory? 

exactly.

> My understanding is
> that 1-1, the compiler approach is still more efficient in terms of the casts
> emitted (and 32-bit narrowing) vs BPF_F_ARENA_SCALAR.

Right. llvm adding casts is a clear win over BPF_F_ARENA_SCALAR.

  reply	other threads:[~2026-11-04 18:02 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-04  1:23 [PATCH bpf-next v3 00/14] bpf: A stack in arena Alexei Starovoitov
2026-11-04  1:23 ` [PATCH bpf-next v3 01/14] libbpf: Make arena 4 Gbyte when max_entries is not set Alexei Starovoitov
2026-11-04  1:23 ` [PATCH bpf-next v3 02/14] selftests/bpf: Test the default size of arena Alexei Starovoitov
2026-11-04  1:23 ` [PATCH bpf-next v3 03/14] bpf: Treat addr_space_cast of a pointer that is not in arena as a move Alexei Starovoitov
2026-11-04  2:12   ` bot+bpf-ci
2026-11-04  2:32     ` Alexei Starovoitov
2026-11-04  1:23 ` [PATCH bpf-next v3 04/14] selftests/bpf: Test addr_space_cast of pointers that are not in arena Alexei Starovoitov
2026-11-04  1:40   ` sashiko-bot
2026-11-04  1:23 ` [PATCH bpf-next v3 05/14] libbpf: Support .bss.addr_space.1 section Alexei Starovoitov
2026-11-04  1:59   ` bot+bpf-ci
2026-11-04  1:23 ` [PATCH bpf-next v3 06/14] libbpf: Relocate pointers that are stored in arena Alexei Starovoitov
2026-11-04  1:44   ` sashiko-bot
2026-11-04  2:02     ` Alexei Starovoitov
2026-11-04  2:32       ` Roman Gushchin
2026-11-04  2:37         ` Alexei Starovoitov
2026-11-04  1:59   ` bot+bpf-ci
2026-11-04  2:30     ` Alexei Starovoitov
2026-11-04  1:23 ` [PATCH bpf-next v3 07/14] selftests/bpf: Test pointers in arena and .bss.addr_space.1 Alexei Starovoitov
2026-11-04  1:23 ` [PATCH bpf-next v3 08/14] bpf: Introduce bpf register BPF_REG_ARENA_SP Alexei Starovoitov
2026-11-04  1:23 ` [PATCH bpf-next v3 09/14] bpf: Add stacks for programs to arena Alexei Starovoitov
2026-11-04  1:23 ` [PATCH bpf-next v3 10/14] bpf, x86: Add BPF_ATOMIC_LOCAL Alexei Starovoitov
2026-11-04  1:23 ` [PATCH bpf-next v3 11/14] bpf: Support BPF_REG_ARENA_SP in the verifier Alexei Starovoitov
2026-11-04  2:12   ` bot+bpf-ci
2026-11-04  1:23 ` [PATCH bpf-next v3 12/14] bpf, x86: Support BPF_REG_ARENA_SP Alexei Starovoitov
2026-11-04  1:23 ` [PATCH bpf-next v3 13/14] bpf, arm64: " Alexei Starovoitov
2026-11-04  1:24 ` [PATCH bpf-next v3 14/14] selftests/bpf: Add tests for BPF_REG_ARENA_SP Alexei Starovoitov
2026-11-04  2:12   ` bot+bpf-ci
2026-11-04  2:29     ` Alexei Starovoitov
2026-11-04  3:31 ` [PATCH bpf-next v3 00/14] bpf: A stack in arena Alexei Starovoitov
2026-11-04  7:35   ` Kumar Kartikeya Dwivedi
2026-11-04 18:02     ` Alexei Starovoitov [this message]
2026-11-04 20:10 ` patchwork-bot+netdevbpf

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=DMMMGML15GX5.3GT3JKTNCB748@gmail.com \
    --to=alexei.starovoitov@gmail.com \
    --cc=andrii@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=eddyz87@gmail.com \
    --cc=memxor@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