All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mykyta Yatsenko <mykyta.yatsenko5@gmail.com>
To: Alexei Starovoitov <alexei.starovoitov@gmail.com>,
	bpf@vger.kernel.org, andrii@kernel.org, daniel@iogearbox.net,
	kernel-team@meta.com, eddyz87@gmail.com
Cc: Mykyta Yatsenko <yatsenko@meta.com>,
	edumazet@kernel.org, ncardwell@google.com, kuniyu@google.com,
	martin.lau@linux.dev, netdev@vger.kernel.org
Subject: Re: [PATCH bpf-next v2 00/13] bpf: Embed local storage values in the storage object
Date: Wed, 2 Dec 2026 20:16:20 +0000	[thread overview]
Message-ID: <04caf16b-1f9f-4952-a0d8-889d848fe930@gmail.com> (raw)
In-Reply-To: <DN8A36W906WG.1BTUYRC2FIIR@gmail.com>



On 11/30/26 4:58 AM, Alexei Starovoitov wrote:
> On Sun, Nov 29, 2026 at 04:57 PM Alexei Starovoitov <alexei.starovoitov@gmail.com> wrote:
>> 1. Move sk_bpf_storage to a tx-hot line. It's a one-line change that may remove the first miss.
>> 2. Prefetch early. Under a static key, prefetch sk->sk_bpf_storage in the TCP transmit path, well before tc egress runs. That hides the second miss.
>> 3. Prefetch the sibling. Once cache[] is loaded, the other map's pointer is already there, so the first lookup can do prefetch(cache[B]).
> 

One more thing: currently prefetches are removed by clang on
x86-64. There is a kernel patch to fix it: [0] and I opened LLVM PR [1]

0: https://lore.kernel.org/all/20261103060658.696994-1-martin.ankerl@gmail.com/
1: https://github.com/llvm/llvm-project/pull/248194

> Numbers are back...
> 1 gives nothing.
> 2 and 3 together are on par with this series.
> It's better to do 3 early too. The diff below hides both misses:
> ...

  parent reply	other threads:[~2026-12-02 20:16 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-23 15:15 [PATCH bpf-next v2 00/13] bpf: Embed local storage values in the storage object Mykyta Yatsenko
2026-11-23 15:15 ` [PATCH bpf-next v2 01/13] bpf: Free unpublished local storage with kfree_nolock() Mykyta Yatsenko
2026-11-23 15:15 ` [PATCH bpf-next v2 02/13] bpf: Add obj_size to bpf_local_storage Mykyta Yatsenko
2026-11-23 15:15 ` [PATCH bpf-next v2 03/13] bpf: Add bpf_local_storage_delete() Mykyta Yatsenko
2026-11-23 15:15 ` [PATCH bpf-next v2 04/13] bpf: Add an inline slot allocator to local storage caches Mykyta Yatsenko
2026-11-23 15:15 ` [PATCH bpf-next v2 05/13] bpf: Size new local storage objects for the inline area Mykyta Yatsenko
2026-11-23 15:15 ` [PATCH bpf-next v2 06/13] bpf: Keep local storage objects with an inline area until owner death Mykyta Yatsenko
2026-11-23 15:15 ` [PATCH bpf-next v2 07/13] bpf: Keep values of BPF_F_INLINE_VALUE maps in the storage object Mykyta Yatsenko
2026-11-23 15:15 ` [PATCH bpf-next v2 08/13] bpf: Refuse the sk storage map iterator for BPF_F_INLINE_VALUE maps Mykyta Yatsenko
2026-11-23 15:15 ` [PATCH bpf-next v2 09/13] bpf: Show inline values in sk diag Mykyta Yatsenko
2026-11-23 15:15 ` [PATCH bpf-next v2 10/13] bpf: Allow BPF_F_INLINE_VALUE for local storage maps Mykyta Yatsenko
2026-11-23 15:15 ` [PATCH bpf-next v2 11/13] libbpf: Do not retry local storage map create without BTF Mykyta Yatsenko
2026-11-23 15:15 ` [PATCH bpf-next v2 12/13] selftests/bpf: Test BPF_F_INLINE_VALUE local storage maps Mykyta Yatsenko
2026-11-23 15:15 ` [PATCH bpf-next v2 13/13] bpf, docs: Document BPF_F_INLINE_VALUE for " Mykyta Yatsenko
2026-11-30  0:57 ` [PATCH bpf-next v2 00/13] bpf: Embed local storage values in the storage object Alexei Starovoitov
2026-11-30  4:58   ` Alexei Starovoitov
2026-12-01  0:33     ` Mykyta Yatsenko
2026-12-01  3:06       ` Alexei Starovoitov
2026-12-02 20:16     ` Mykyta Yatsenko [this message]
2026-12-03  1:37       ` Alexei Starovoitov

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=04caf16b-1f9f-4952-a0d8-889d848fe930@gmail.com \
    --to=mykyta.yatsenko5@gmail.com \
    --cc=alexei.starovoitov@gmail.com \
    --cc=andrii@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=eddyz87@gmail.com \
    --cc=edumazet@kernel.org \
    --cc=kernel-team@meta.com \
    --cc=kuniyu@google.com \
    --cc=martin.lau@linux.dev \
    --cc=ncardwell@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=yatsenko@meta.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.