Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp533370pxm; Wed, 2 Mar 2022 22:19:03 -0800 (PST) X-Google-Smtp-Source: ABdhPJxXYtoYgI8PksYJKI4v3Lr3Vw+5Uu+tnBUIxbX6r8k816kk6eVHNOYh29p1W5H6aJ0rN2m2 X-Received: by 2002:a17:902:7b8d:b0:14f:f1c2:9ff4 with SMTP id w13-20020a1709027b8d00b0014ff1c29ff4mr34379524pll.54.1646288343466; Wed, 02 Mar 2022 22:19:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646288343; cv=none; d=google.com; s=arc-20160816; b=HvNeoMn4c14ylcYk1s36IxjDIva2DA05S/GJa8LCRwM9XJUFWeHD5JvQzHSaazbgEJ BDuV5jK6XsJC3HDaS/LGhvYc53hCBMfyRW5deAcHdrdngv8aMeHJ0UJU1X5lA2yRa0JD ENNuJZTO6yYcD/ENKY2nkB2JBZSpIHaz/NNihmi/9WWOKR5EsoOwfgsoxGHQ0B4KbU5n kSFYWfDNTTIo3UetdvN4kxsi1LCFe2WG4uo+ozPFYhMszU5kBAeQsR9gR9B5FfxxTrMZ FcwTabopN4LEJ+qvsEg+J6hjn5iN4gNwKdgCozE97U2P8+f18oO3jEhc4lAhC74Yq3FF rDyw== 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:cc:to:from:date :dkim-signature; bh=TtgNIOo8D68hUsVD1c5Ig2jR5WrozFoankh4D6QoEh8=; b=l8fw9YdPhlDigSBsE/RAxLdwnQ3XF3yTWsgFPPFLRs608vOvBLeQbychwIforH58Vg GvrP90HWL0E/wOLbuYRVIjQi07bVa5v9JPfuhf1Owcv4wMSaZS83j0vNow9KtH1fd6Xo OV4cVlIB3bgk5NLX8v31nop+JOFdsSaGeGgnxOfhDhVfOQbF7vffwnTKFh5dHDsOYBIv 7TfDPHD5ZaL142CjR7xpSZfvJ6tnU2vnn5fLDI1dALxP7fOTZPO+v1Z6K/Qc5LHWkC+X ANtG/anHOcivIPB/7rGf6akYCpZINLhgIPHRRpLcdn4JRHm5gDHdnoymowVjKZ/W3pbh fCvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=swDDeyTO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n8-20020a63b448000000b003742978e143si1193928pgu.646.2022.03.02.22.18.46; Wed, 02 Mar 2022 22:19:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=swDDeyTO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229644AbiCCFWO (ORCPT + 99 others); Thu, 3 Mar 2022 00:22:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38680 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229458AbiCCFWN (ORCPT ); Thu, 3 Mar 2022 00:22:13 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 415791637FE; Wed, 2 Mar 2022 21:21:27 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id CB406B823AA; Thu, 3 Mar 2022 05:21:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E15A9C004E1; Thu, 3 Mar 2022 05:21:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1646284884; bh=QpJA8xs1s3NtV8aEbClD8BQ6uzwMgBrnvimTomtkHjw=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=swDDeyTOV3PIAXnPCPH7l7dgtozIokCEu4ffnu5sDkl2NMrCObISCXS6AKqa4x9EN qMunvySTWU6dcfeEyP/2Ixretdyylw26joA6j2ALYQeSKD68psdLVd0leqX967s8i/ pCm+cgr/cxHzSDVUNzZC9mY5hbbCFhAzt65cuoinw8UVcoHjtkgt/RfUNbLLjeamt+ asvToTju/wKIByt84QMBnSZG77HtIFzhvYMRm1No1DLmzOmuI7S64Bqp4Tl7psdgVW W7IA6QnWrXl6/+riMM4BOm0ITB4nbwtsQ6B0xjJ97h+rv40qfZcBrqyWKHK9ktTcLG PlDXu9HebD03g== Date: Wed, 2 Mar 2022 21:21:22 -0800 From: Jakub Kicinski To: Dongli Zhang Cc: dsahern@gmail.com, netdev@vger.kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org, davem@davemloft.net, rostedt@goodmis.org, mingo@redhat.com, ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org, imagedong@tencent.com, joao.m.martins@oracle.com, joe.jin@oracle.com, edumazet@google.com Subject: Re: [PATCH net-next v4 4/4] net: tun: track dropped skb via kfree_skb_reason() Message-ID: <20220302212122.7863b690@kicinski-fedora-PC1C0HJN.hsd1.ca.comcast.net> In-Reply-To: References: <20220226084929.6417-1-dongli.zhang@oracle.com> <20220226084929.6417-5-dongli.zhang@oracle.com> <20220301185021.7cba195d@kicinski-fedora-PC1C0HJN.hsd1.ca.comcast.net> <20220302111731.00746020@kicinski-fedora-PC1C0HJN.hsd1.ca.comcast.net> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2 Mar 2022 14:21:31 -0800 Dongli Zhang wrote: > > because of OOM" is what should be reported. What we were trying to > > allocate is not very relevant (and can be gotten from the stack trace > > if needed). > > I think OOM is not enough. Although it may not be the case in this patchset, > sometimes the allocation is failed because we are allocating a large chunk of > physically continuous pages (kmalloc vs. vmalloc) while there is still plenty of > memory pages available. > > As a kernel developer, it is very significant for me to identify the specific > line/function and specific data structure that cause the error. E.g, the bug > filer may be chasing which line is making trouble. > > It is less likely to SKB_TRIM more than once in a driver function, compared to > ENOMEM. Nack, trim is meaningless.