From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.82.49 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796242585; b=hFuvKbZR5/2SqYrrPYBqXmbe49oSFaPLm/UiXmrqKqNigd48s57DuBvdq032vZTRYI9Z xNDJX3SDiILBJWV62VLMAihVD/daRYqW8IJpBqV19WPEhZRn5l5ARjhkgwCprPDrCloXH dlIcqDzd0pYZdVz4rYSILjfE6vsCytnH46AHP/xfyTVRIgyTMoIFiOq+BvXj5nInqgsAN l5rMBiC9+g6gYCQzqaCSHl3LOLHDwDO87wY5wkL9MhT7VUhcdCD2ec0fX3Ofq240oYKqK +NingLNw8a0Nhb/fB2CVDKsm4gLyaHDvjRWX60YtVJ3/1H01Dy72RAAMS2M+D6ESeNw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796242585; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: Message-ID:Date:MIME-Version:User-Agent:Subject:To:Cc:References: Content-Language:From:In-Reply-To:Content-Type: Content-Transfer-Encoding; bh=9wzgQfcxhzIY2+wEebH7LVBgVJaJZykWWd2KBhH+PEo=; b=q6EakZRq3Q7A4t3dbV1HQNyYP6o7nyrODqDo6jtyxfcEAT6FoBN/AU5RjPDYvxmbMQ9p ovRbVI29yfjRWplj7Mw6rafWnZxzJQzqWg6qBfgNe3fDGkz/QIfUu9ZDEAogYCesbKyZk ioxJTpz2TEE5WKnH99oD4NmgiKfX6V0xGqUyATVtRdI4I/8xdTMpE+8C6LyEyGi18oD97 212dkAYWxVQ70LSyeXPo/JG9VUhdWBNBADORwBJrhI+wXd7KILnpsF5hikmP0k/grQp0G UykBVkFBSJNTaeN2W4n60eXOT+cZRabjuKs4kjdVDB7ugKq8agg4yUi0fVExER2XPBw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=e1GeTQ77; arc=none smtp.remote-ip=74.125.82.49 Received: from mail-dl1-f49.google.com (mail-dl1-f49.google.com [74.125.82.49]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A714E606A334 for ; Wed, 2 Dec 2026 20:16:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org A714E606A334 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=e1GeTQ77 Received: by mail-dl1-f49.google.com with SMTP id a92af1059eb24-1a3c08d6928so20918865c88.0 for ; Wed, 02 Dec 2026 12:16:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796242584; x=1796847384; darn=vger.kernel.org; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to :content-type; bh=9wzgQfcxhzIY2+wEebH7LVBgVJaJZykWWd2KBhH+PEo=; b=e1GeTQ77Au9momuvdVCCzOo1UamwRuuPTK3Nqz1cT6hfvcKcX5F4fJEU3DMURNv0qo j4V11JMMTpe7AFsQ2qtNVdboSABnNusvxn+cv2TWCiwCAGEqKvrxeHl7+TVu/D9K0ekD 32lKZ5s7+JGC8mA2/rIjElz1rLv+iteuyC0G2MwzXEc4dFbH4miqWYLjDlETTD4ADivo 25PpiU0f5IGUBgkyH6J2A/Nd9W+E2JL68Ic3fUMOyR95wpwnpfn+2M4cAF9m81neZo13 zVcjNiIXubAohENRNrZ4L3cShyS2q6KJ/VNZW6QRulEdZkAAY4VJ1IYdtJF3Gl36h2VI Yb9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796242584; x=1796847384; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=9wzgQfcxhzIY2+wEebH7LVBgVJaJZykWWd2KBhH+PEo=; b=MbVjJBsIfhRhpDW6/5NmsLhN/yJ65dAa/7No2X+vC1DNV0PKZssaLSTCJ7dHf+XbgW pSY0ycf+uewyHTvOeVEx+WKKk+KlQ9cLCvLCivor4YXluz6J7wqOW/PfHs6z62byhbXH qW8pudRcFmWrRmkF0PdTePfnlY+E7M96m4Cf2jcMAfPr6TNhQ5zQ3fxu2TXP20Mkqao8 r73GpFe3N//Fwo2AHju0DcZ6zTp3gMY1kzWWjgyFP2sWRbJagWJd9GvOf1q+0CoxLZC3 hOi+YPL1k9w8l4ZS70Zxnt0ri++wWfG8qbGFl4d18g/XZfoTzA1DtmKTqwHYTTXNZxQ/ 65dw== X-Forwarded-Encrypted: i=1; AL+hErH3EFHNBx3gTMnH5DaRozSpWq367oa4s4Abt5c5EcFjcuUlrEqpMsP5PkHKw3Uqn+alYZ8=@vger.kernel.org X-Gm-Message-State: APuU4Z9o8EBEM/gSi6mr4r1dB1VlNttvMDGIzmhQq6zJ+lZ6rplfhJB5 namrq0BgfHjfdCJBUE5+C7ZAeNMAK2FQFcl890wOpweD6kXAMqp4sjth X-Gm-Gg: AZFdTZdxys4DBr8a7+B7a1VAWMhV4PHM+HiRpYFWtWrt+ggEkx7Q+QYbThgl8Tsj5tf SIaoAYoV6GZVYDWAqBUCboIDMgRJEdR3jpuitzOWG89cHqZlruDDysvji/Pw7JlLEulNrfmu/IF SpyG3EcMzMxRUzQCexJtfKbuwMGJJ0AceiEy8swCT+DoJPNqerrqNeDsg2BALoVDr9KnMtsnOkq wmmtZel7IxGnzc85iJrLE6wvDJGJ26ezV/HucmrjnRvoN2rpATR41TMVtPCjQcQIkrn+eX7bQtB BWkmfeavLoOKpXFMsezthV1Ekeo+TL+6UEwTHoLqvfAGSJYyQhobfmJZqKphQ8H51c+z9gAf04c 1rl32/Bb8Ml8scE8bT7muJYbNACogXhYfbUl8SxA8B/JzJ+405lGEoosU8b+pbJBTg5aSDpKquK aOcBrUH2RHmFirsVRGRlHyp0S8s+AxMeFrItKyfGE+/NpSIbQfxZ1nOfcC2HFCjY/g4zhfZbmWQ 6rDLagY8edBX5yUPtKyjv1gWw49Qzk7T+w3qrKT5sAulGPu1LdMjgg9ODhtvAso/DdfUsn429S8 lJS6yCuakiuLe3+YBdX3iylz/D6fBy1HhYxa1Y++/0aAxrYyabDOe35dxZ7gQcmXwbk= X-Received: by 2002:a05:7022:6985:b0:1af:16c4:d06b with SMTP id a92af1059eb24-1b55686d5c1mr54378247c88.10.1796242583387; Wed, 02 Dec 2026 12:16:23 -0800 (PST) Received: from ?IPV6:2a03:83e0:115c:1:2763:6171:8d29:cbc3? ([2620:10d:c090:500::5:32eb]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-1b556847fdasm106125902c88.13.2026.12.02.12.16.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 02 Dec 2026 12:16:23 -0800 (PST) Message-ID: <04caf16b-1f9f-4952-a0d8-889d848fe930@gmail.com> Date: Wed, 2 Dec 2026 20:16:20 +0000 X-Mailing-List: bpf@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH bpf-next v2 00/13] bpf: Embed local storage values in the storage object To: Alexei Starovoitov , bpf@vger.kernel.org, andrii@kernel.org, daniel@iogearbox.net, kernel-team@meta.com, eddyz87@gmail.com Cc: Mykyta Yatsenko , edumazet@kernel.org, ncardwell@google.com, kuniyu@google.com, martin.lau@linux.dev, netdev@vger.kernel.org References: <20261123-sls_f1-v2-0-76474de9b052@meta.com> Content-Language: en-US From: Mykyta Yatsenko In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 11/30/26 4:58 AM, Alexei Starovoitov wrote: > On Sun, Nov 29, 2026 at 04:57 PM Alexei Starovoitov 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: > ...