Article View: linux.kernel.netdev
Article #16053Re: [PATCH net-next] net: ena: reuse the whole RX page on 64kB page kernels
From: Jakub Kicinski
Date: Fri, 13 Nov 2026 23:34
Date: Fri, 13 Nov 2026 23:34
52 lines
10085 bytes
10085 bytes
On Fri, 13 Nov 2026 21:35:17 +0000 Arthur Kiyanovski wrote: > On 2026-11-11 16:47:51-08:00, Jakub Kicinski wrote: > > On Fri, 06 Nov 2026 03:17:11 +0000 Harry Yoo (Meta) wrote: > > > > > This shows up when RX data stays in socket receive queues, as each > > > queued skb keeps the whole 64kB page alive while at most 16kB of it > > > holds data. On an EC2 t4g.large instance (64kB pages, 8GB memory) with > > > 519MB left unread across 64 TCP sockets, RX pages pinned 2869MB of > > > memory while the socket layer accounted only 687MB. > > > > I'm not sure you're actually fixing the problem you're describing? > > You optimize the memory use but the (unused) tail of the buffer is > > still not charged to any skb, is it? Or does it now fit perfectly? > > > > Normally when the page can no longer be chunked up we should charge > > the tail to whoever happened to use it last (see the page pool code > > which does that). > > > > Either way, you have to respin this on top of Breno's fix which > > was applied earlier today. > > > Jakub, > > If I understand correctly what you are saying, you are correct. > skb->truesize is still not reported correctly. > > The focus in this patch is different. It is about using the whole > 64KB page instead of only the first 16KB. > > Harry's own figures show most of it is recovered — 497MB pinned for > 519MB unread, against 2869MB before — so the remaining gap is the > final tail of each page, not the 48kB. > > So I agree the commit message needs to be more precise. > > The skb->truesize fix can come as a separate fix after this one. You sent it twice? Some LLM automation gone wrong judging by the m-dashes in your reply? :/ Making more efficient use of allocated pages is not a fix, and will not be accepted to net or stable. Not accounting truesize correctly can be considered a fix. IOW the truesize accounting change has to come _first_. Then we can optimize the memory use w/ 64kB pages. They can both go to net-next, but the cannot both go to net. Hope spelling out practical implications of what I said earlier makes it clear to everyone..
Technical Details
Message-ID:
<20261113153413.541945b6@kernel.org>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-362981-linux-kernel-netdev=dewy.ruReferences:
<20261106-ena-rx-reuse-64k-page-v1-1-ac75b20c5de8@kernel.org> <20261111164751.5ac643fa@kernel.org> <179460571746.22458.2892088316099736810.b4-reply@b4>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-362981-linux-kernel-netdev=dewy.ru From: kuba@kernel.org (Jakub Kicinski) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net-next] net: ena: reuse the whole RX page on 64kB page kernels Date: Fri, 13 Nov 2026 15:34:13 -0800 Organization: Usenet Network Message-ID: <20261113153413.541945b6@kernel.org> References: <20261106-ena-rx-reuse-64k-page-v1-1-ac75b20c5de8@kernel.org> <20261111164751.5ac643fa@kernel.org> <179460571746.22458.2892088316099736810.b4-reply@b4> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Injection-Info: usenet.network; logging-data="1466463"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:3zlVJ5E9KWuTrEr05LEtCVToBeE= sha256:/f6QIJiF3ojZzcKInlq7CgbfqwW8v/+tIRcfeIkdBc0= sha1:MNfQGAELdLxHPZMD8RAOWU+XybA= sha256:iwH7HYrM7OD4F3psRymxz+1v3t5iDIILA0jn4qRb7OQ= List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 945461146E5; Sat, 14 Nov 2026 02:35:15 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.501 X-Spam-Status: No, score=-3.501 tagged_above=-9999 required=6.31 tests=[DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=kernel.org X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id opt0UOrRPNo3; Sat, 14 Nov 2026 02:35:12 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.232.135.74; helo=sto.lore.kernel.org; envelope-from=netdev+bounces-362981-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Received: from sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74]) by mail.dewy.ru (Postfix) with ESMTPS id F30381146E1; Sat, 14 Nov 2026 02:35:01 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sto.lore.kernel.org (Postfix) with ESMTP id 2AD0661CC16; Fri, 13 Nov 2026 23:34:44 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1794612855; b=kditv7wFhOoF4cNU71aJq86GRx5J2MIjXLdnWpNvsiGHV0dS7mIZ/Rg+O8HppDTPZJvS VnQekfl/3xqDAtgv1SLAjesx5rlLUpb1WENoez9Ca8wVD7Y4hxDxF0bOwm5Lh25rk1bb0 PavtIOHSldKRiMbNrp2R3RWz0fWURNNfDUKnjuarB/0/9uzPFCK3Z/ij8sum1p3TfIqRS RhgWrLHRDlhAzDJXVpSXeiVWo7BrNgdhhc2IyZj0yZ/LKPlPRXx+uFCZxHa7GiAvuAJ5C w7q34tiaQu5OuIAzodz+3NCeAJnYyxOrmGsCZiSUFuw6qnuSHZxYVfGMJMhHthCcbqg== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794612855; h=X-Original-To:Received:Received:DKIM-Signature:Date:From:To:Cc: Subject:Message-ID:In-Reply-To:References:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version:Content-Type:Content-Transfer-Encoding; bh=HWE9qB5/FYd66wghp0lgQgQG3+G/Uk8xX47Q6AQKNFk=; b=zpA0prFjWKuSq0WvdPa4X/j6wtrT1kR464nb7rBbz1AUM/e1ZXXNILxwAKE+XB7ABAPr 0ugmUTL9hVq0HCl7Ubj1LYMwgR8jSFUhfSfo5I0eEW69plr2hGGW7kRknnFTevJR9QmEk LUAnEdc7MIYVreA1eFeEDz5hYSt0vfoVoBvRUXyS4ES9QIiABGR+eIrJc4gJpi1zKEFWc B6DDOpND1sSAA4mZG9VsvTP0OCloa1qmqckrk+6loN+m6yRE0sz2pyAxqsHsIJK/whaH1 BmQQdLNp/wU3FcnUKy+G721O2r6Y0wsd0Zcnnyr68EQNuGXrq/4XsjLXXqHXYwPmczA== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Bv9X+um5; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AD9F260A2622; Fri, 13 Nov 2026 23:34:15 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Bv9X+um5 X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1794612854; b=f2E+SgZewrevnkENgOM45cYQlaZXgknkybLZ4VneEH/n435G+/cP/SEK6uen13JZcGux a3Th4gzfcHy9G/IdQRlz3jHpjTwOiSmUO+TOQ454tmlVJn702vP2/81AYjNItSZZ69CGN a/ZqgrFIjohRjTc076Qtgy2qJjy3nZOGn+9cNZZ7PMXeAsdLkhwddWOSpAh4ZqrMlmN2Y 7yqrxIIf35984EMCeHHPt+WKPwhsqYUrlr1QanHsx5WfpPTFig/ANdIY5cau8J3NZRiCO LplPpLNvx8tULISB7LZb8SFTtfmzBqSVUeZhNQmfO/kVmCIEcZduZlWpEIr7L3S7r/g== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794612854; h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: In-Reply-To:References:MIME-Version:Content-Type: Content-Transfer-Encoding; bh=HWE9qB5/FYd66wghp0lgQgQG3+G/Uk8xX47Q6AQKNFk=; b=Ulw/OAaXU5PjqEawEguLdkQwjQiHtlgWUtVlEVye9i6lxba2u0reweVW/Ip4icATAWR0 A79Y5RgUvPpMs8fJa03NopQJurocv3WXKeIs8izAeUqr+G8pux2P7DVxUH9MYRpNgKitd 8ihUv1w6JD3iEDd28sjDDTzyKQfAQ8Wp/870LwRPuULaj1Ci854wQ8YMnJXY13KI1ZB6X EPh2EoPqyS38m3ZnsnUb01QWCYLfW0OFfPNXzag4PXxqZzEw0dZfZCQJ+LOhWwAnuNRcS Jakj8L31AVtY/GuJQAHpBPQICk7dQyp8Mbp2jdSXFXSk2dPVy0IKftZ46AZrv/4X/jg== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Bv9X+um5; arc=none smtp.remote-ip=100.103.45.18 X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CFD7A606A891; Fri, 13 Nov 2026 23:34:14 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4B4781F000CB; Fri, 13 Nov 2026 23:34:14 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1794612854; bh=HWE9qB5/FYd66wghp0lgQgQG3+G/Uk8xX47Q6AQKNFk=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=Bv9X+um5+bmN9SEwaiFNvbeFWjChgBczKEprYxEvtQWzjn04uQlwOCJ4u15aqDT4q C7YdIQr360Vr69Ct5bJLE6PsrzVwqtuKF47tUsqYSFzvS6ajMsh/jczMBfW9cCcLjZ vimi4EO23Yh8XoX/IjI5lpzEYAl+XHmvLlWWirSJkiZdhOy2btCMnv2h2ayGsAUxwi WFE2L+p22NEkGnLn+gLNJ1Ya2Dh8eN1NNULpdVDXqWfW5lGAMmkK4BdtE8OlJuuMQj O2i1MKuAn75WUkp0NK/RNFcbq08+H/Ths9qyf8QuJ112BTnLjrVYGLxzunx6gQEpsA 8IpmnQY9z5tvQ== X-Cc: "Harry Yoo (Meta)" <harry@kernel.org>, David Arinzon <darinzon@amazon.com>, Andrew Lunn <andrew+netdev@lunn.ch>, "David S. Miller" <davem@davemloft.net>, "Eric Dumazet" <edumazet@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Breno Leitao <leitao@debian.org>, <kernel-team@meta.com>, <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org> X-In-Reply-To: <179460571746.22458.2892088316099736810.b4-reply@b4> X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list