Netdev List
 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: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20261123-sls_f1-v2-0-76474de9b052@meta.com>
     [not found] ` <DN84Y298SZZL.3GHOLS9WYETHQ@gmail.com>
2026-11-30  4:58   ` [PATCH bpf-next v2 00/13] bpf: Embed local storage values in the storage object 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]

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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox