Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp13104pxb; Fri, 15 Jan 2021 06:37:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJxYRgj/wfVUb+s0ztv+ozp3Ska9HFa780mTUNjVFN35q36hapzb4qIfs506v6Bxdg5V63n+ X-Received: by 2002:a17:906:bc8f:: with SMTP id lv15mr4162674ejb.180.1610721434107; Fri, 15 Jan 2021 06:37:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610721434; cv=none; d=google.com; s=arc-20160816; b=UYpExHRwqqcT6TJ+d7ICOAb0EVg94jOfQXXu09k4ATACUjaYU8bnTXq0z7gzWQDegg SDCHXa7jeVyfVAd53fPjDxiRPWEeWuTbn/t2c/SZeaR/Tf6niKA9HoOk3aS/z2vsWjvU uN+pydmy1InZ4PfGewCbMfB508mq6+CqVgCk3cN7mBChhoCdLvV9cWxWx4glbQQivnFl QopvPqC3junAZCcHpHDNUoGGADaklpk8+YF+CVOgLgA/rY76MILMXfD6obRK+MB5C3EQ /WJ9yDcL0UXhmEkzVZB2TCamVRIqVOs7XE91Ls/vgPUNEaftYng5ByXDXYNFWII06Go9 hpYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:reply-to:cc:from:to :dkim-signature:date; bh=TQQJqIAOl8U91/OpE5V91qeQpQLEEGZk67YCSZa+8Lo=; b=0whgf49nO6kKv9DorFEt04uapk23XZy+aawzOJ+23YcCUVmLS6cxJOewfIcrHFYeC+ BSycSIN70P6aqG7FTMMiNVVaWskkOWdrcVhGT/KFxKUaSEVMz4xyPxKNeacGTqpj9YVJ Rh6k3fcKvygP8hTqEix+qJfN5vSFLW+SzbWR/fSND8W/SZagTtaPL8N1H5D7kpWbFrSI geLQwj7tHAnfvzGFBYHzZ1fJB5WO5Gb4wpGxqNS9SBj9/Es6DyTce5FCgihGkfDMlGEz RYDASSfp7LM9ZGtBchXUK7xjECfVH+DM9t5r4xDEOWCTXQ6+6iC1muhI0I+bWaLYe14+ LZPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@pm.me header.s=protonmail header.b=mffgRhhw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=pm.me Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z19si2340501ejl.162.2021.01.15.06.36.49; Fri, 15 Jan 2021 06:37:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@pm.me header.s=protonmail header.b=mffgRhhw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=pm.me Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732612AbhAOOft (ORCPT + 99 others); Fri, 15 Jan 2021 09:35:49 -0500 Received: from mail-40133.protonmail.ch ([185.70.40.133]:12019 "EHLO mail-40133.protonmail.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731805AbhAOOfs (ORCPT ); Fri, 15 Jan 2021 09:35:48 -0500 Date: Fri, 15 Jan 2021 14:34:56 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pm.me; s=protonmail; t=1610721305; bh=TQQJqIAOl8U91/OpE5V91qeQpQLEEGZk67YCSZa+8Lo=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=mffgRhhwcN97uCvyqIBv0S412R4INgXfk74WYkNomIF2o/yBP/5oH7pcKMWx0SqWH N1Od6MyrojuRDXmUs6E6JUllsHLmTD5dHyLhm46gzWrc6lmJsbx2Ei3BHtrxkosfXc tVuu8bzPBeEYVs4gFtaUk3YgteTwCHdFXWx34E7xQk/zILkM3DhRSWy709DpjQ46iy kL7dtppXXgi5EcouJYniwZS/ZrOtj84TkyQ1yREPKKpcd4+emWxCygaUjm69cpwozt yw/QAT+gJHrJE7MylyF8k+QrBvYVOTNATHCjriekzEPTI33P4G4nrtaUK5cKK3w2om BraQVaNjLyKoQ== To: Eric Dumazet From: Alexander Lobakin Cc: Alexander Lobakin , "David S. Miller" , Jakub Kicinski , Willem de Bruijn , Miaohe Lin , Guillaume Nault , Yunsheng Lin , Florian Westphal , Steffen Klassert , Dongseok Yi , Yadu Kishore , Al Viro , Marco Elver , Alexander Duyck , "Michael S. Tsirkin" , netdev , LKML Reply-To: Alexander Lobakin Subject: Re: [PATCH net] skbuff: back tiny skbs with kmalloc() in __netdev_alloc_skb() too Message-ID: <20210115143424.83784-1-alobakin@pm.me> In-Reply-To: References: <20210114235423.232737-1-alobakin@pm.me> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mailout.protonmail.ch Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Eric Dumazet Date: Fri, 15 Jan 2021 15:28:37 +0100 > On Fri, Jan 15, 2021 at 12:55 AM Alexander Lobakin wrote= : >> >> Commit 3226b158e67c ("net: avoid 32 x truesize under-estimation for >> tiny skbs") ensured that skbs with data size lower than 1025 bytes >> will be kmalloc'ed to avoid excessive page cache fragmentation and >> memory consumption. >> However, the same issue can still be achieved manually via >> __netdev_alloc_skb(), where the check for size hasn't been changed. >> Mirror the condition from __napi_alloc_skb() to prevent from that. >> >> Fixes: 3226b158e67c ("net: avoid 32 x truesize under-estimation for tiny= skbs") > > No, this tag is wrong, if you fix a bug, bug is much older than linux-5.1= 1 > > My fix was about GRO head and virtio_net heads, both using pre-sized > small buffers. > > You want to fix something else, and this is fine, because some drivers > are unfortunately > doing copy break ( at the cost of additional copy, even for packets > that might be consumed right away) You're right, it's about copybreak. I thought about wrong "Fixes" right after sending, but... Sorry. Will send v2 soon. Thanks, Al