Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp76955pxf; Tue, 23 Mar 2021 22:46:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyVcmDkzki+FEi/3OhN5QJ1mr2uITsNIQ70zhnFEIDGwQn5eHv6rn7oAbG5lGuEaxHJC4Dx X-Received: by 2002:a17:906:1444:: with SMTP id q4mr1795598ejc.343.1616564773989; Tue, 23 Mar 2021 22:46:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616564773; cv=none; d=google.com; s=arc-20160816; b=xvPCDYHad7b7SU342WkgPoxKLMsY+7gpYWBxG0VCGy1EXyO6f3R53TzV4XAF5XzgeG dLAQpLbz0kjEfO6MlIheH/ZgiHlywAXIT8dZmFKfz/ll2CnWfJEoCHoU+dqJGTESatbA 4KAnNer262fYkSUtHbU8oCGmnW7wRGNYK5BUL1tSFaWjKlGjT30IQKgIDNYw/O3LhtwB KqmKcGPOiBIwzmdRPK80A8tqrWKdpZtuY5j9WhA54rbktbKS3hG7fFLeyprydE3mapH8 tWHfJE/sC+OhoTuxHJHb0nN8rM1uqp3ReARLWk4Zgh41kFDkxy7dJxJ0ycgcqfjBT5vV 8ekQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=OtJczClZvyyzUz2W99ySZlZwsk7iPU0WG7wWmkyfXgQ=; b=ozrJIXPA4YnL1toVEYEUbiGCRcRkf2uf3SpCkyz4wNKuq6m6+pdmUScBnrVTIgJGyw 2EXWKdtaaBHCl43QU/d4xk5lA4eyxWsYCKMkD6n7HdK7F5gENUlJ/A7aP2NY+aFdGW/i bUI6MU+eLDa+22bjcsMQnEfhq1AjtsAgpqBqzRh0t1rDZV4UT1AUXmuBSPcjUhpl8wzu VTjSdPUDIh9HWDuip6TyfMjRQuJei4aW5M2nZ+BImQ6jQyxVCOlpbNemDTQ+GWGenFSB 4LQ73x5yOhMWTAYiznTu1fI4y79tYmQuxxo6B5OmVchqlNrZViYeuX+fjCNp6cRipoiw 7/Ug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uOQcAENr; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id fx8si991342ejb.481.2021.03.23.22.45.51; Tue, 23 Mar 2021 22:46:13 -0700 (PDT) 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=@linaro.org header.s=google header.b=uOQcAENr; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233161AbhCWQLT (ORCPT + 99 others); Tue, 23 Mar 2021 12:11:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42730 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233067AbhCWQKv (ORCPT ); Tue, 23 Mar 2021 12:10:51 -0400 Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D1A3FC061574 for ; Tue, 23 Mar 2021 09:10:50 -0700 (PDT) Received: by mail-ed1-x52c.google.com with SMTP id j3so24054422edp.11 for ; Tue, 23 Mar 2021 09:10:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=OtJczClZvyyzUz2W99ySZlZwsk7iPU0WG7wWmkyfXgQ=; b=uOQcAENri96Ujd0j2x9QyFmGHd81FS40zuZgNTVQ83ux6jRqlUcR/hbhuTMU2RGnkJ wuj5mMAlMWKZ3Miww2PYmeQuIolvMTxzicIvnrHKqFhNEJiDVBwk/JjoUzaowecIEu03 6Ucu0AUjymXbCYqkRgFH/iC/irP+Wu+OXemJKKZS7xEXLdkHbXKIF5Y1fpWwKjhXfJWH Qtf/uUH2guRKmyQ3PljjT1z2RbbWX/rbz+LYwtGOXkWt2IiMSbHBRhrrx9czPjxpboca HusYM6pwdyh/qt2fclT95Gf0KQNtgc3jV9hpvdc3MLwd1YIDG3lE9JXMjlzNmV2YKK6C /YWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=OtJczClZvyyzUz2W99ySZlZwsk7iPU0WG7wWmkyfXgQ=; b=MofLFlRBrq1NtWlDMp4CcGJFc9F0z1GSUy8eZoq15f4zzciExeVF+k+KMPMlK4Z0op QlZ8SmWslkzWJE8L1Rx+AtfBXoNMTi3gY6Hh8EceUAbzuSGOMGD2jxJDQ82WdMoisWYt Awc61ZEmjzMH+hVCtboEqs8ujV/ewfkwX+a29VKhmz9qCotd07DcgdGDilPoQwkS2jXd n/J7r7K51JFRY6pSHILRfLZJLcSilxGbWNLri8ADVoFPEOy4f0pGfYoHWiMOH4So4lzG wutUlAkPEV+jqejlV0eVFScyz7mqpQBzYUiAzRpipEnzx1HtGWsofDbAdid02kkoSC9o OuGw== X-Gm-Message-State: AOAM532kgXHl216KyhIFA4k8FrZlDE8FQfzBcjtO8JVe5Jl8ZBOPJoYR VliJk0zHko2/dtt569SM1Pacvg== X-Received: by 2002:a05:6402:160e:: with SMTP id f14mr5360148edv.45.1616515849553; Tue, 23 Mar 2021 09:10:49 -0700 (PDT) Received: from enceladus (ppp-94-64-113-158.home.otenet.gr. [94.64.113.158]) by smtp.gmail.com with ESMTPSA id k9sm13271942edn.68.2021.03.23.09.10.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Mar 2021 09:10:49 -0700 (PDT) Date: Tue, 23 Mar 2021 18:10:46 +0200 From: Ilias Apalodimas To: Jesper Dangaard Brouer Cc: Alexander Lobakin , Matteo Croce , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Jonathan Lemon , "David S. Miller" , Jesper Dangaard Brouer , Lorenzo Bianconi , Saeed Mahameed , David Ahern , Saeed Mahameed , Andrew Lunn Subject: Re: [PATCH net-next 0/6] page_pool: recycle buffers Message-ID: References: <20210322170301.26017-1-mcroce@linux.microsoft.com> <20210323154112.131110-1-alobakin@pm.me> <20210323170447.78d65d05@carbon> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210323170447.78d65d05@carbon> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 23, 2021 at 05:04:47PM +0100, Jesper Dangaard Brouer wrote: > On Tue, 23 Mar 2021 17:47:46 +0200 > Ilias Apalodimas wrote: > > > On Tue, Mar 23, 2021 at 03:41:23PM +0000, Alexander Lobakin wrote: > > > From: Matteo Croce > > > Date: Mon, 22 Mar 2021 18:02:55 +0100 > > > > > > > From: Matteo Croce > > > > > > > > This series enables recycling of the buffers allocated with the page_pool API. > > > > The first two patches are just prerequisite to save space in a struct and > > > > avoid recycling pages allocated with other API. > > > > Patch 2 was based on a previous idea from Jonathan Lemon. > > > > > > > > The third one is the real recycling, 4 fixes the compilation of __skb_frag_unref > > > > users, and 5,6 enable the recycling on two drivers. > > > > > > > > In the last two patches I reported the improvement I have with the series. > > > > > > > > The recycling as is can't be used with drivers like mlx5 which do page split, > > > > but this is documented in a comment. > > > > In the future, a refcount can be used so to support mlx5 with no changes. > > > > > > > > Ilias Apalodimas (2): > > > > page_pool: DMA handling and allow to recycles frames via SKB > > > > net: change users of __skb_frag_unref() and add an extra argument > > > > > > > > Jesper Dangaard Brouer (1): > > > > xdp: reduce size of struct xdp_mem_info > > > > > > > > Matteo Croce (3): > > > > mm: add a signature in struct page > > > > mvpp2: recycle buffers > > > > mvneta: recycle buffers > > > > > > > > .../chelsio/inline_crypto/ch_ktls/chcr_ktls.c | 2 +- > > > > drivers/net/ethernet/marvell/mvneta.c | 4 +- > > > > .../net/ethernet/marvell/mvpp2/mvpp2_main.c | 17 +++---- > > > > drivers/net/ethernet/marvell/sky2.c | 2 +- > > > > drivers/net/ethernet/mellanox/mlx4/en_rx.c | 2 +- > > > > include/linux/mm_types.h | 1 + > > > > include/linux/skbuff.h | 33 +++++++++++-- > > > > include/net/page_pool.h | 15 ++++++ > > > > include/net/xdp.h | 5 +- > > > > net/core/page_pool.c | 47 +++++++++++++++++++ > > > > net/core/skbuff.c | 20 +++++++- > > > > net/core/xdp.c | 14 ++++-- > > > > net/tls/tls_device.c | 2 +- > > > > 13 files changed, 138 insertions(+), 26 deletions(-) > > > > > > Just for the reference, I've performed some tests on 1G SoC NIC with > > > this patchset on, here's direct link: [0] > > > > > > > Thanks for the testing! > > Any chance you can get a perf measurement on this? > > I guess you mean perf-report (--stdio) output, right? > Yea, As hinted below, I am just trying to figure out if on Alexander's platform the cost of syncing, is bigger that free-allocate. I remember one armv7 were that was the case. > > Is DMA syncing taking a substantial amount of your cpu usage? > > (+1 this is an important question) > > > > > > > [0] https://lore.kernel.org/netdev/20210323153550.130385-1-alobakin@pm.me > > > > > -- > Best regards, > Jesper Dangaard Brouer > MSc.CS, Principal Kernel Engineer at Red Hat > LinkedIn: http://www.linkedin.com/in/brouer >