Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp320097pxb; Thu, 23 Sep 2021 00:11:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwvaJudRb2CLiPW4UBumNVswscov69hLzR1CkZ8cfV7Hsb4z4/qeW7Ylt0n1nlqYdIgUBk6 X-Received: by 2002:a17:906:a012:: with SMTP id p18mr3447820ejy.331.1632381087774; Thu, 23 Sep 2021 00:11:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632381087; cv=none; d=google.com; s=arc-20160816; b=U5KcAOWBdvMNg5wNxtYzQA0bV+TTa1jCpPnhQ+UNTTdiRfPkkoJc1xUDO+ZUlilT0+ n0jLXEP43fVxG8y+UtHwVQWFSzSf1WXKanMMwSClVoDz6SbbSixk19N149zpUiyQBzc4 po6Kxr+cQ6zVIPBihgBihtE5ANJi4CX9dmXj6r90KN8iipQEbbDtz9oj3rrbAi8Jj+25 fLn1eoCjMhmc88VAjYAqCbjxReyf36b9a0vGP8WiVQxMbnZHwcHUpIFhwqDS8TGAaiXT ksq+fC4BhEE+QFPX/NUkAhACnoHaSMPAPo4I34Jp979ICx3IpAChuTWqrdsgZker9xxi V1ow== 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=al6aRxBJTHCHmw5L/7ubtKaJ9PdDCptUmmdfzhB20/g=; b=ctlx+wxPqUNHXKWdRBM1cy3LlaqLdTZpHYkZ5u9LH5lN3BcBCToq++8gLeteprLWEg yj6KvOV2MI+Mu/QOdFVoI/BqdE17njc3OlHJpP98ZUn4w6cCsmWd9mqubDyDV0BfIaYX O+oBve8B8f56oV/ri5PndFIoz1cbG9KiuZKZuzmhfY0jymM1facaiyI821QPV20+Qmf8 2QRPNSqdJrJB3+l3C5VIFY1elT7p2VcQJ15Aov1LxyavydD4XMnV/PDWVIt0fWJTkaEx nl5clynxY07CTzmM1NEwQglGa5LKF9Nk8DlPaikXUw/6gRzrh1h7f4Wi3bbp6akEzEka 9Eqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pjlgvB9g; 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 b88si6976151edf.312.2021.09.23.00.10.35; Thu, 23 Sep 2021 00:11:27 -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=pjlgvB9g; 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 S239761AbhIWHJD (ORCPT + 99 others); Thu, 23 Sep 2021 03:09:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58086 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239666AbhIWHIu (ORCPT ); Thu, 23 Sep 2021 03:08:50 -0400 Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8C56EC061756 for ; Thu, 23 Sep 2021 00:07:19 -0700 (PDT) Received: by mail-wr1-x42d.google.com with SMTP id g16so14225040wrb.3 for ; Thu, 23 Sep 2021 00:07:19 -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=al6aRxBJTHCHmw5L/7ubtKaJ9PdDCptUmmdfzhB20/g=; b=pjlgvB9gpczXyVGy4KGKCkrvML2s1dAaukSFuRttdgOCPKZAanD/dd1hmQIuyb3gbM qkwMmuWRnw0DeczT3AqGL0LvEHNvSNwnj2Shw/BxvO/CYCuVt0qC2FWS96Fn8gDebpdM 7up7/y1GKkC0DqEJFl5QX2uqvpIBAJHnlO6K3l3DvZBNCAGBslRSe6arFQqLDbG1GaQ8 SuIh2zHWiJ8viXZWhRszlcIcJGWwbSeiLEMloumBnxKEQBf04aSYYp3zZtqiQvdFW/7+ ZiQsxB+Ue2vQ43PfiYN3GFtAfgF2jwAuacHLKzXHTXKOGjYpKKmMyz3mof/eYL3E+xNd 5T3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=al6aRxBJTHCHmw5L/7ubtKaJ9PdDCptUmmdfzhB20/g=; b=hY6OPBjJY9rtLwKtVkjUx+gBP3lZEfMTRd1xBg+HzHG8n/jfn2npt1WhJiYFNlvwhf +eUC1jQfK40txR2qFrqo7VOn5YjjKW2Gd+teUXHs4f4zgg32xL370PflQzL9hgTam9Jl 9hPu/gMjuubea7ZXQdvC2cL1JSu/t9hiwN1MSAOsjiIqVtiUgijYZW/axvex3GViia0f PGJZt68aa80teZbWLNOalYE8E6VWACVRq95H7eTYAeLjFmsh/BPuRv8NyEJQxIbtcC/2 wI6uTkARIbKCIlQNIr8/WP1/2y1gQqbaC6EOCJXwpkLaRdcVsAWKAuxRl79AcZm/tbgj SYEA== X-Gm-Message-State: AOAM530mgf/hQk8P3TfrZBIZrg0ckGjbz/HXeybL+yUtXap3MdZSly4g EpyeiZz1HuARkkYgfLnvdeQFkQ== X-Received: by 2002:a1c:2313:: with SMTP id j19mr14177832wmj.189.1632380838114; Thu, 23 Sep 2021 00:07:18 -0700 (PDT) Received: from apalos.home (ppp-94-66-220-137.home.otenet.gr. [94.66.220.137]) by smtp.gmail.com with ESMTPSA id c8sm4522911wru.30.2021.09.23.00.07.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Sep 2021 00:07:17 -0700 (PDT) Date: Thu, 23 Sep 2021 10:07:14 +0300 From: Ilias Apalodimas To: Yunsheng Lin Cc: davem@davemloft.net, kuba@kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linuxarm@openeuler.org, hawk@kernel.org, jonathan.lemon@gmail.com, alobakin@pm.me, willemb@google.com, cong.wang@bytedance.com, pabeni@redhat.com, haokexin@gmail.com, nogikh@google.com, elver@google.com, memxor@gmail.com, edumazet@google.com, alexander.duyck@gmail.com, dsahern@gmail.com Subject: Re: [PATCH net-next 0/7] some optimization for page pool Message-ID: References: <20210922094131.15625-1-linyunsheng@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210922094131.15625-1-linyunsheng@huawei.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Yunsheng, On Wed, Sep 22, 2021 at 05:41:24PM +0800, Yunsheng Lin wrote: > Patch 1: disable dma mapping support for 32-bit arch with 64-bit > DMA. > Patch 2: support non-split page when PP_FLAG_PAGE_FRAG is set. > patch 3: avoid calling compound_head() for skb frag page > Patch 4-7: use pp_magic to identify pp page uniquely. There's some subtle changes in this patchset that might affect XDP. What I forgot when I proposed removing the recycling bit, is that it also serves as an 'opt-in' mechanism for drivers that want to use page_pool but do the recycling internally. With that removed we need to make sure nothing bad happens to them. In theory the page refcnt for mlx5 specifically will be elevated, so we'll just end up unmapping the buffer. Arguably we could add a similar mechanism internally into page pool, which would allow us to enable and disable recycling, but that's an extra if per packet allocation and I don't know if we want that on the XDP case. A few numbers pre/post patch for XDP would help, but iirc hns3 doesn't have XDP support yet? It's plumbers week so I'll do some testing starting Monday. Thanks /Ilias > > V3: > 1. add patch 1/4/6/7. > 2. use pp_magic to identify pp page uniquely too. > 3. avoid unnecessary compound_head() calling. > > V2: add patch 2, adjust the commit log accroding to the discussion > in V1, and fix a compiler error reported by kernel test robot. > > Yunsheng Lin (7): > page_pool: disable dma mapping support for 32-bit arch with 64-bit DMA > page_pool: support non-split page with PP_FLAG_PAGE_FRAG > pool_pool: avoid calling compound_head() for skb frag page > page_pool: change BIAS_MAX to support incrementing > skbuff: keep track of pp page when __skb_frag_ref() is called > skbuff: only use pp_magic identifier for a skb' head page > skbuff: remove unused skb->pp_recycle > > .../net/ethernet/hisilicon/hns3/hns3_enet.c | 6 --- > drivers/net/ethernet/marvell/mvneta.c | 2 - > .../net/ethernet/marvell/mvpp2/mvpp2_main.c | 4 +- > drivers/net/ethernet/marvell/sky2.c | 2 +- > drivers/net/ethernet/mellanox/mlx4/en_rx.c | 2 +- > drivers/net/ethernet/ti/cpsw.c | 2 - > drivers/net/ethernet/ti/cpsw_new.c | 2 - > include/linux/mm_types.h | 13 +----- > include/linux/skbuff.h | 39 ++++++++---------- > include/net/page_pool.h | 31 ++++++++------ > net/core/page_pool.c | 40 +++++++------------ > net/core/skbuff.c | 36 ++++++----------- > net/tls/tls_device.c | 2 +- > 13 files changed, 67 insertions(+), 114 deletions(-) > > -- > 2.33.0 >