Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp4416696pxf; Tue, 23 Mar 2021 10:04:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyEewaeg7MY0D0bFfucQS03Pff88pTedl/q6WWI0iRihTlxMOIgkVx1wROAp8rhfyVw40r9 X-Received: by 2002:a17:906:8147:: with SMTP id z7mr5666265ejw.436.1616519072517; Tue, 23 Mar 2021 10:04:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616519072; cv=none; d=google.com; s=arc-20160816; b=AJqjRXp2TIq/v4BoDjue8Jp0hynyQc1JrLodFytdP410D5ZhMTX+M5IDosYutwJ/N0 ZVKPl3TOibz+9EaLwZraU7CJHbTwEPSaZJrGiibLqPdOQAxxR43VscCMvU984reiu4+3 Ta0wZE1QL+zecTtEBgPhtFvbw1sr5QJiIhNB0KRR2SXiDN4NpHMoAkhPv0k8JhpT5RBb vpjPYUHM0BTFwgafXqUOO04UsLAK3V3leZPqzjONSqMM3jH8rpe+s4+d6en0u9h2+Uuw lnV1Gq8zECeFP6pYpycsYMCE+kxTb2xeW1wuHqnvW6N924PLN9S8rp5dN8HL9eymyDGV Rkxg== 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=395prUbwI/IfV0JoklEZBoBsZBXXiAGcosueqqFVoGU=; b=r+En74158+61nbe0tYmNuKr9YOXye8gF9n6H9UfAwFnM71camzkd684L5SGyKZaMtH IplQ90F2/XwPinoJ0p9mPgr/hfm7plIKGlyhGn086Us01gjVXwuGQEfjGI+iIY7zFP96 NanYX++rgwCcaKiAmdu6lF/vW5Qs0Crt6ERF4EYy6bQKSvRsswYaBQgyxIHaiFDKrj+4 3f0eolozzXsef6+95KO6n4tqTKm8xJrRY6qWC84kLN+K+MPfg2ZrT/dEY/rUdE4sfDU0 lxojz9kGCEUycyjEKwZhrmYeo/sRU8ZUj4V/I1EgNZwIvhzqzm7RElIbWJDMGPNrrtbN EKeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=arSFjkI8; 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 e9si13701534edv.149.2021.03.23.10.04.08; Tue, 23 Mar 2021 10:04:32 -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=arSFjkI8; 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 S229879AbhCWRCR (ORCPT + 99 others); Tue, 23 Mar 2021 13:02:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54112 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229764AbhCWRB5 (ORCPT ); Tue, 23 Mar 2021 13:01:57 -0400 Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 21B81C061574 for ; Tue, 23 Mar 2021 10:01:57 -0700 (PDT) Received: by mail-wm1-x335.google.com with SMTP id z6-20020a1c4c060000b029010f13694ba2so11231043wmf.5 for ; Tue, 23 Mar 2021 10:01:57 -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=395prUbwI/IfV0JoklEZBoBsZBXXiAGcosueqqFVoGU=; b=arSFjkI8NS7BWO4Mgnjs45V4EHoKoaHEFT+Vn0Mt1dc0Cve0UVTM+xcz99Opm49sum jYDvL90nVd6IuLycEBXgiS4BpG4ID3m0AdMpm39ufsAD53leRfmLLnuCI4MNtIcgBOx1 ZC+ezpnTrBn+2B6/lGnWfHNquOrHQn4gW8xH6cUqt99UlRpqMxegq0UlRIh07feJreVn Db2wk5w6HF8c2xmzl8j5lOdHThGGFJIC9oWMDRwWEe4jV2XiDYwCaL3wTbA5DINqzp12 sJvg2cht5mNj4rTdET7L+rneAwsvBIw+eOqR1PmrcOnKZb4MOCN4n7IPh0MMhqmOqDcM vTPQ== 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=395prUbwI/IfV0JoklEZBoBsZBXXiAGcosueqqFVoGU=; b=DP4C1NB5zTLpiMaPBweo+mQddVsK2fCnElXD5qvj2FOStNVBhKml1e0rHsQ0wvhEsf DFzEAYjPPCwxfle5axMvQRW516QUPO6k40lM8aru9+NKMHxtjQ2IZGpvNSAaRlEEZHNO u/WNQHHMNIm1gdb7f99LCMf8OxG35TqeWtJdesnP8QKtcH5vmvqBw27Z1fcfohVxXcp8 VC9CYy6D8luCdwyQAoNJ2smmm/pHmEgDcMWUDJzvIHpkglXnB7kx+nzC6GRWEjEhvVmH 2m2Whg1hzIvfLMUpnL6QaOu59WTpgQ5u0EGv7CF8EKT7QapASi8LPp3OXNYjMQ0Kmv+r Rg1Q== X-Gm-Message-State: AOAM530LHS3+6CC0/ze6DJoAnCwp1ryi7NUGz7Jg0c0sBu6VY66TrMuM RFJRt007SCcucf46P2D4L/fOfw== X-Received: by 2002:a1c:2683:: with SMTP id m125mr4257280wmm.178.1616518915892; Tue, 23 Mar 2021 10:01:55 -0700 (PDT) Received: from enceladus (ppp-94-64-113-158.home.otenet.gr. [94.64.113.158]) by smtp.gmail.com with ESMTPSA id q15sm24087968wrr.58.2021.03.23.10.01.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Mar 2021 10:01:55 -0700 (PDT) Date: Tue, 23 Mar 2021 19:01:52 +0200 From: Ilias Apalodimas To: Alexander Lobakin Cc: Matteo Croce , Jesper Dangaard Brouer , 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> <20210323165523.187134-1-alobakin@pm.me> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210323165523.187134-1-alobakin@pm.me> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 23, 2021 at 04:55:31PM +0000, Alexander Lobakin wrote: > > > > > > [...] > > > > > > > > > > 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) > > Sure, I'll drop perf tools to my test env and share the results, > maybe tomorrow or in a few days. > From what I know for sure about MIPS and my platform, > post-Rx synching (dma_sync_single_for_cpu()) is a no-op, and > pre-Rx (dma_sync_single_for_device() etc.) is a bit expensive. > I always have sane page_pool->pp.max_len value (smth about 1668 > for MTU of 1500) to minimize the overhead. > > By the word, IIRC, all machines shipped with mvpp2 have hardware > cache coherency units and don't suffer from sync routines at all. > That may be the reason why mvpp2 wins the most from this series. Yep exactly. It's also the reason why you explicitly have to opt-in using the recycling (by marking the skb for it), instead of hiding the feature in the page pool internals Cheers /Ilias > > > > > > > > > > > > > [0] https://lore.kernel.org/netdev/20210323153550.130385-1-alobakin@pm.me > > > > > > > > > > > > > > That would be the same as for mvneta: > > > > Overhead Shared Object Symbol > > 24.10% [kernel] [k] __pi___inval_dcache_area > > 23.02% [mvneta] [k] mvneta_rx_swbm > > 7.19% [kernel] [k] kmem_cache_alloc > > > > Anyway, I tried to use the recycling *and* napi_build_skb on mvpp2, > > and I get lower packet rate than recycling alone. > > I don't know why, we should investigate it. > > mvpp2 driver doesn't use napi_consume_skb() on its Tx completion path. > As a result, NAPI percpu caches get refilled only through > kmem_cache_alloc_bulk(), and most of skbuff_head recycling > doesn't work. > > > Regards, > > -- > > per aspera ad upstream > > Oh, I love that one! > > Al >