Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp5510927pxb; Wed, 26 Jan 2022 13:47:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJy8j3bDWLFcfNX79k2slx8z1K2fhGOQSfObWPFwWpD3dhhYD4G91rbM4qsIuxNL6gpUk9/V X-Received: by 2002:aa7:de05:: with SMTP id h5mr912916edv.356.1643233665703; Wed, 26 Jan 2022 13:47:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643233665; cv=none; d=google.com; s=arc-20160816; b=iBOrRLZtv7kSuVabqzLXvZcLjMveYqF9owWM5A7kK7atIKwHO66cPZq9dP2d4g3B2i iRzaW5jNa1+t07Yp49jZgelmxmeS/smiyDfNVm2MoRrUhgCZ52L3SOZtLq8Bra0TA8It T1SCLCh6L4HmQk0eKhOb9klM03B0rFodaNQSrtyZyo5vKu0afd/Xcg5FoOAblAk41ogJ iWJCBPEVh7SeeebBwb3+ccKqtO06zPGYk7cVfTa5wBVcyXgk/VCjj75XwspwyW5pyjTY m7azsEHPOphXMXvxYudimU+jA+svS/4xk/Pa31Y1c6HAJMI+HdyJF+nV2dPidN04gNcZ EjvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:in-reply-to:date:cc:to :from:user-agent:references:subject:dkim-signature; bh=rbZmqkJk3vkuCsTBRrPDjVNqrBC9mOsn8Oh+RWvJ8Fk=; b=ElzBfUwNkhVj0ie/YZFjuy/9W3hmM/wNTYNw21Q48P5AXURDW9ZTfWL1P/lo0dSceA G1HyVRO8uRO2al2azPHjMjqaTfMnyVhDf6HTrsJfmJQOEXw5oB4OwyL25PXjSS2JmCx4 FLc7QbXly0lGw6klphkO6xOMHje4MFkH25AoNm3SlvBAlIL/8GsTCgSikEbshSjCbSzc 0Unc/cYC5te6pBw3NrQaUNaWSZAa8FX46KVmA3/RW8EnCOsqqGTrKn3G+H81YeBY+XPD WPuII6LIg7OUCPgjBtMD2VgssddVvQ6s5+WV3O7zBAEzWXULwIvTUlnpgH0ttJQyw7nE kYAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=I3EDarDX; 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=amazon.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z28si217706ejl.19.2022.01.26.13.47.18; Wed, 26 Jan 2022 13:47:45 -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=@amazon.com header.s=amazon201209 header.b=I3EDarDX; 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=amazon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242651AbiAZPRm (ORCPT + 99 others); Wed, 26 Jan 2022 10:17:42 -0500 Received: from smtp-fw-80007.amazon.com ([99.78.197.218]:9303 "EHLO smtp-fw-80007.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242657AbiAZPRk (ORCPT ); Wed, 26 Jan 2022 10:17:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1643210261; x=1674746261; h=references:from:to:cc:date:in-reply-to:message-id: mime-version:subject; bh=rbZmqkJk3vkuCsTBRrPDjVNqrBC9mOsn8Oh+RWvJ8Fk=; b=I3EDarDX4X+GWNSrdh518xf6YJRrBB8dYQX466ixNSNfo1Ju/CnrlhWV bqbqOU2X7SWWX4Hg4myMTW+8KBEvc/RhgsJRqD/a4xMz0JIvtFh/6mZdK gtZUtMNDYEPLSkoLdGgEaOR+x0VmgHTd7NZM849eVhLJqhzPkfWiTmHi4 E=; X-IronPort-AV: E=Sophos;i="5.88,318,1635206400"; d="scan'208";a="58196395" Subject: Re: [PATCH v2] net: ena: Do not waste napi skb cache Received: from pdx4-co-svc-p1-lb2-vlan2.amazon.com (HELO email-inbound-relay-pdx-2b-0085f2c8.us-west-2.amazon.com) ([10.25.36.210]) by smtp-border-fw-80007.pdx80.corp.amazon.com with ESMTP; 26 Jan 2022 15:17:27 +0000 Received: from EX13D28EUC001.ant.amazon.com (pdx1-ws-svc-p6-lb9-vlan2.pdx.amazon.com [10.236.137.194]) by email-inbound-relay-pdx-2b-0085f2c8.us-west-2.amazon.com (Postfix) with ESMTPS id 141D941A80; Wed, 26 Jan 2022 15:17:26 +0000 (UTC) Received: from u570694869fb251.ant.amazon.com.amazon.com (10.43.162.8) by EX13D28EUC001.ant.amazon.com (10.43.164.4) with Microsoft SMTP Server (TLS) id 15.0.1497.28; Wed, 26 Jan 2022 15:17:18 +0000 References: <20220123115623.94843-1-42.hyeyoo@gmail.com> User-agent: mu4e 1.7.5; emacs 28.0.50 From: Shay Agroskin To: Hyeonggon Yoo <42.hyeyoo@gmail.com> CC: , Arthur Kiyanovski , "David Arinzon" , Noam Dagan , "Saeed Bishara" , "David S . Miller" , "Jakub Kicinski" , Daniel Borkmann , "Sameeh Jubran" , Wei Yongjun , "Lorenzo Bianconi" , Date: Wed, 26 Jan 2022 17:16:35 +0200 In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: text/plain; format=flowed X-Originating-IP: [10.43.162.8] X-ClientProxiedBy: EX13D30UWC001.ant.amazon.com (10.43.162.128) To EX13D28EUC001.ant.amazon.com (10.43.164.4) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hyeonggon Yoo <42.hyeyoo@gmail.com> writes: > CAUTION: This email originated from outside of the > organization. Do not click links or open attachments unless you > can confirm the sender and know the content is safe. > > > > By profiling, discovered that ena device driver allocates skb by > build_skb() and frees by napi_skb_cache_put(). Because the > driver > does not use napi skb cache in allocation path, napi skb cache > is > periodically filled and flushed. This is waste of napi skb > cache. > > As ena_alloc_skb() is called only in napi, Use napi_build_skb() > and napi_alloc_skb() when allocating skb. > > This patch was tested on aws a1.metal instance. > > [ jwiedmann.dev@gmail.com: Use napi_alloc_skb() instead of > netdev_alloc_skb_ip_align() to keep things consistent. ] > > Signed-off-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> > --- > drivers/net/ethernet/amazon/ena/ena_netdev.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > Thank you for this work Acked-by: Shay Agroskin