On 11/30/26 4:58 AM, Alexei Starovoitov wrote:
> On Sun, Nov 29, 2026 at 04:57 PM Alexei Starovoitov <alex…@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/2026…@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:
> ...