Article View: linux.kernel.netdev
Article #16373Re: [PATCH v1 net-next 2/8] tcp: Don't collapse high density skb.
From: Eric Dumazet
Date: Sat, 14 Nov 2026 15:33
Date: Sat, 14 Nov 2026 15:33
30 lines
9815 bytes
9815 bytes
Le sam. 14 nov. 2026 ร 05:01, Kuniyuki Iwashima <kuniyu@google.com> a รฉcrit : > > tcp_collapse() starts collapsing skb to a new skb if either > of the following is true: > > 1. skb is less dense compared to tp->scaling_ratio > 2. skb has read data before @start > > However, this could make situation worse. > > The new skb size is SKB_TRUESIZE(SKB_MAX_ORDER(0, 0)) at most, > and with PAGE_SIZE being 4K, its scaling_ratio is 222 (86%). > > If 4K-MSS GRO skb updates tp->scaling_ratio, it can be larger > than 222. > > Then, even the newly collapsed skb could be detected as bloated > by the next tcp_collapse(). > > Also, even when only a few bytes are read from GRO skb, it is > collapsed by the 2nd rule, making less-efficient skb. > > Let's cap tp->scaling_ratio with the collapsed skb's maximum > scaling_ratio and use unread bytes for bloat detection. > > Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com> Reviewed-by: Eric Dumazet <edumazet@kernel.org>
Technical Details
Message-ID:
<CAL4WiirVAvjv-+2LJbkRcVQ+t_Fh5_Nt9kkJbJsYo7fd9HTXFQ@mail.gmail.com>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-363341-linux-kernel-netdev=dewy.ruReferences:
<20261114040101.1043546-1-kuniyu@google.com> <20261114040101.1043546-3-kuniyu@google.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-363341-linux-kernel-netdev=dewy.ru
From: edumazet@kernel.org (Eric Dumazet)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH v1 net-next 2/8] tcp: Don't collapse high density skb.
Date: Sat, 14 Nov 2026 16:33:35 +0100
Organization: Usenet Network
Message-ID: <CAL4WiirVAvjv-+2LJbkRcVQ+t_Fh5_Nt9kkJbJsYo7fd9HTXFQ@mail.gmail.com>
References: <20261114040101.1043546-1-kuniyu@google.com> <20261114040101.1043546-3-kuniyu@google.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Injection-Info: usenet.network;
logging-data="1600960"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:lAwDuTiDyga3t4feEwCkwHE9g48= sha256:PuSB4Q18LDuVUomNfI4HIH+mjTvz8QlnMusA9u94jPg=
sha1:b89DRgszDkl2ZpaMVM4NbuE7jVA= sha256:jK84RyOj3jKqaEOwge6FXDNAr7FcW6e7imdHftAyhhY=
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 B137A114855; Sat, 14 Nov 2026 18:34:05 +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 iTg5yuIDsVG0;
Sat, 14 Nov 2026 18:34:02 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.232.135.74; helo=sto.lore.kernel.org; envelope-from=netdev+bounces-363341-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 C3588114833; Sat, 14 Nov 2026 18:33:54 +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 79DFA6151B7; Sat, 14 Nov 2026 15:33:50 +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=1794670428;
b=Z9bCOS/cPmw8mJKiNA3FV9VcaAktRI9NoqXmb2jJ8K21f8I41D07/p6gZ0IczBbXXWGB
n7AMh7kRA+WltYvB7U5a6o1iHxn5kj8EHzz7aJ+a31OZYE5tfgcTC2hPXGq8IE8lf+l+O
T10DAI5MPBYQjRAK8AgskzGGhv9WSmfwBn6papPSFyhxVJvBtvEq/SrDXEU4UShSsXPPd
3i1Gj/lTRl9CDJzs+OSCM+p5uokm0jdh4fQEdfSbTIVnFg7WliPLRK56AvXzfIMd4gitM
jzd9qA8XanXhbmfKI7a4vFbZUf5s8EVMna6FE1xn/T8z4T6keGrRSaLMcu9aukRrtZA==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1794670428;
h=X-Original-To:Received:Received:DKIM-Signature:Received:
X-Forwarded-Encrypted:X-Gm-Message-State:X-Received:X-Mailing-List:
List-Id:List-Post:List-Help:List-Subscribe:List-Unsubscribe:
List-Owner:Precedence:MIME-Version:References:In-Reply-To:From:Date:
X-Gmail-Original-Message-ID:X-Gm-Features:Message-ID:Subject:To:Cc:
Content-Type:Content-Transfer-Encoding;
bh=6IGjr6D6fzEJZcvgx9FvyfcpYyzq4AV1N2b99/KEpNg=;
b=FFedXt9yHc5QuEs7gvHQnkrQBjlNQ8FlFEJ5Mn9EKHV+V4fh+gLuV4JINvq8vxIa3+tQ
vENpF9owAGKAevY79Px+qBSdINeX6e+OM7w+RSjMWAwEMgKzesabqLZ0LNSR0b0p5H1gf
Uay0zqMhJrizyK6nUCUEGhiiNee7FnAX44SKcmWsU6jbXXBtmULi3R7T2EGNkJ6G+IG0T
Z+2H1dwWIONYtDtiYnvORSxV+3CTuBBW2WWoF2U0frjeI5qnymkD0FtV9bwUnE+qKZgir
0A3YkGGdDNCC0I55ibwpCAiGwJWJ/yQ+T2EqpdCd04WILGoPEx+aDGQRomwvSQWLaiQ==
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=WEQgjd7X;
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 8C3F7606A334;
Sat, 14 Nov 2026 15:33:48 +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=WEQgjd7X
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=1794670427;
b=V264Wp12/pplngChxbxGt/bgxfit7HyAL2S/5IF3aOmfb11p0sVK69uQGxBDd5GsnqOy
IL2prQ8pYPqB/iGH85GOhJtcfugbbhYOx+CGxklI8BlLViJlHV5DnA4A7vN4a5mgspnRH
e/OFiJ+l8nUphVpK6u69SWzx4FVhH60TxKNBQhs8sbFJoudSkuzmM2WgILez5AdWuDZ60
2ufMI1ObcBA3hemE3IsroeDr76Q6x8pznphAZN+odQFmXBUHitDG0IKTBri2NZBKvx9xu
HrpBe6KQSVjqR2UGKAunaK3L/L0b/+fhRl0RIqh7ypobmyC6HfmZwmRk5kY+PN2VJ9g==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1794670427;
h=Received:DKIM-Signature:Received:X-Forwarded-Encrypted:
X-Gm-Message-State:X-Received:MIME-Version:References:In-Reply-To:
From:Date:X-Gmail-Original-Message-ID:X-Gm-Features:Message-ID:
Subject:To:Cc:Content-Type:Content-Transfer-Encoding;
bh=6IGjr6D6fzEJZcvgx9FvyfcpYyzq4AV1N2b99/KEpNg=;
b=u4zhPepoeATCf2GZfidpQaHBXaNnKnfDoGpOnFPIZtNLSPyWTAuziOqB0By6LGWBLq0o
uG+fpo7A7XnOZ4W/yJUS021UduWmNbHIT2IaKfgSV67KWyx8uivLHDuZvy/ZuZaJWMrf0
VOGjkXjYt1RGK4QSmwfrvpoAZ+zdnk3BbRA1sYl58funYyyfP9kHEfLFRZbB5+JrGinze
dCJ/FKTfYalhcxpInOAbFV4A4offZBeEITHSP40C7VJ/eUQ07DYvwTF+3VQfTcv86gcSv
mrNEYFSgCTQw+022bW7s7fnhoBC11YACbmX10scSDXn+bLYEzoKLtJVWvf3f6OxEzVw==
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=WEQgjd7X;
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 A666D606A323
for <netdev@vger.kernel.org>; Sat, 14 Nov 2026 15:33:47 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3EF9F1F000CA
for <netdev@vger.kernel.org>; Sat, 14 Nov 2026 15:33:47 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
s=k20260515; t=1794670427;
bh=6IGjr6D6fzEJZcvgx9FvyfcpYyzq4AV1N2b99/KEpNg=;
h=References:In-Reply-To:From:Date:Subject:To:Cc;
b=WEQgjd7XTtS6AvRw4v+wDDtXlD70vtoYdoOHpI+EWpmGz4G0JwXsUe+HVYIBVrSZP
iM1faR91oPUjCEmJsmwDTCR3hhUoIHC9l/huV7ByJaq9bT9IfG/Y5udD3JmcjCUOEw
eyLsM88L4fkQUNFNJgKLZrbWidS3EAJ55NKlghmmAmno/XkEP9DwdqapIR9r5QMFbL
FRyXrwkNJaU+fxZxlGpvF+iB9v6iPI82edUi8WuCUl8gTEMs/14zCcQIuuG5/FPF/j
GWaL4kVU4d7TCLU1dVh3/BOLkPEZ3UwGrXcYS0xWrYIcjDwNylECUH0NKc8PzDwUvj
9OTQ1xaehshlQ==
X-Received: by mail-oo1-f44.google.com with SMTP id 006d021491bc7-70b875f6f1fso2597953eaf.2
for <netdev@vger.kernel.org>; Sat, 14 Nov 2026 07:33:47 -0800 (PST)
X-Forwarded-Encrypted: i=1; AL+hErFsofQenUsl8i4yakbiQgI4TFTGozrGbF6XfhZnyPTgOOrw/ZtNr6cl0PC8HPtJFOKaatDhdLU=@vger.kernel.org
X-Gm-Message-State: APuU4Z+zEF7nxj9PtnGWQ5aB0cVtMuP9IN145tsovMrZz1CUb6+SqltU
4dxIFY2pvFYGmXV5pswJz/GiAHq1JUZvLJZx9IPRojH1Rr9u2gQVCtCHdfLekVDDVK3bLBpI38e
ZfBC7hHYByJMuUBG1r1M9wIv2pPmu+CM=
X-Received: by 2002:a05:6820:1628:b0:6e1:d890:3825 with SMTP id
006d021491bc7-71ab4fde843mr3391591eaf.18.1794670426591; Sat, 14 Nov 2026
07:33:46 -0800 (PST)
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
X-In-Reply-To: <20261114040101.1043546-3-kuniyu@google.com>
X-Gmail-Original-Message-ID: <CAL4WiirVAvjv-+2LJbkRcVQ+t_Fh5_Nt9kkJbJsYo7fd9HTXFQ@mail.gmail.com>
X-Gm-Features: AclHuK80nYn4Q1sDQa4udRyJHlmcCD3KHwEsRvAyWMrOkp-LVugCKTsBVeSd6uU
X-Cc: Neal Cardwell <ncardwell@google.com>, "David S . Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>,
Kuniyuki Iwashima <kuni1840@gmail.com>, netdev@vger.kernel.org