Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4312986pxj; Wed, 12 May 2021 02:51:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzzv+INCqJlD4pDRM154dO8JcVrEyYOwiM9HRAmBswrPR23fZPbbYlm/XqFdHH6d79/zcFR X-Received: by 2002:a5d:9c84:: with SMTP id p4mr14936230iop.56.1620813103181; Wed, 12 May 2021 02:51:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620813103; cv=none; d=google.com; s=arc-20160816; b=SxmlrWw9La+S+3hZsur5CxmzHQGTJymv+raKL/c9QMihHihsyqGZXw/2+hozM9fJD7 1kXLfYiMsuCmbz2MADv838BdueZG9uzE79ZIPiyDrYMCI6xS2scu4pBZ79UaVas4cw+J WIJRyp6RmhHRwhE8hj/HLWxkom8I3Bc/dfg9Sy1Rn/SRx8zB39fxgbqLKG/hKdcdqdEA mdstWT3mOZOcr6vtSBolc1KA/9QIGEoDmgRO4jQ7etoSjad8W/zV/I12ynE9f3YqWYuj ZBC4wXat4wA9oqSr0p9fP/c/198Z/D1V4ywfCm7fR8QJPFNziXKV4NK0tueBHnwquLRS RkgA== 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=1GGUsVMHLE+IZgAeaNUaXpWdQucmX1IJ1U87o5AWB8s=; b=xNHv2VUd4wZxHPGcxKcYTTU6/ST47aSQPTsGum2ww4oK78zyY5GAc/L9fdYBIbu92F mgJZzdRk0aOexvHImJqZKhLMj54btZYaQbluCFV7apAqv/T74cU/y+U6C11NrEORliPH QshDwB0CUtE2fdgUmwSE31dod99h6rJQHidY/aX5GWOIKQnolMd9ga57loYH83sppLRw /4Goa9++RV+igyr3SPnCr36bQ8aYosW0i80MBkuIOUb/VuGOELCr0aNbuanCgeAMTNVY Q0czHCZU/6PpxRThjKNlZuy37Hs35S5Vqvpvh11HO7DxG+580CWJeM/g7n1+4jnk4DHu rXQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dsXi6+0L; 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 e10si22509049jaq.25.2021.05.12.02.51.30; Wed, 12 May 2021 02:51:43 -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=dsXi6+0L; 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 S230272AbhELJvk (ORCPT + 99 others); Wed, 12 May 2021 05:51:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55826 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230114AbhELJvj (ORCPT ); Wed, 12 May 2021 05:51:39 -0400 Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B118C061760 for ; Wed, 12 May 2021 02:50:30 -0700 (PDT) Received: by mail-ed1-x536.google.com with SMTP id s6so26264847edu.10 for ; Wed, 12 May 2021 02:50:30 -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=1GGUsVMHLE+IZgAeaNUaXpWdQucmX1IJ1U87o5AWB8s=; b=dsXi6+0LX4t+9I7MTbwVdtOk7zzsArKhSuULaxCvj2iBGrnDe01i5L5qyCHksIqOuR F3x3O2sul75deZpTuwJvVwAzK/1QfZs86ltV4Owx4R91a2hQf5ySMECYMDxMyJOcnYCK E4Bz5qj6B2d8U4FkikUs12sVmL7ry4l8jNa7ZxLgs32nJW90DgsjE1yd7zVFFVuOU3uD cLNdUfVI1ZeWsVG5lngJwX8wDr4oJ6CzitK4be65XHK9dMrAwFE/IyPoFlsFbD9hcqEG k6TMbIA0GDSRitCYZ5rfQGxfqvGzfFE4n1DFMRP9o09pVMJiKWKQRFwIJKImH36cwFAA h4Cg== 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=1GGUsVMHLE+IZgAeaNUaXpWdQucmX1IJ1U87o5AWB8s=; b=km60aLyrycTPlWK6rWHaBjRE+O8Y5oAfhbFHK5/zhC+gmSVpcMDwq8AZ7FFWy83D7H Ltl6MiEQ/iQyO8EWI8Rn+i9Zoe4FVAZuHyN794yR3uNWj4nLEggkTx2RsepJkVsz/Ezd nDAVEVMJZ6//8/ewMsZ+U8DiQAq1SasbjHsp3rhY2da+Ktiyx64JhsbRTek170k3Tndz Ot0qoyI0spOOpBiYP0bOtY0XayFpbN/aXa4DViOtjeKd9dR15kT9yLFY7ttuVacWC9lO CWe1e9XaB09fLP5oTnovkIZ3ij3E47bPZN02pKdh0bWAjly9zYy8kTsIwPjT1Px+jIJD JEAw== X-Gm-Message-State: AOAM532grsStABf6xeLNNbutcj868bPSlHn7aZCtbE0iCYP6SzvsE5u/ EhihOMjDw4JZeCRnLnkFi4zBlw== X-Received: by 2002:aa7:cd83:: with SMTP id x3mr41440462edv.373.1620813029119; Wed, 12 May 2021 02:50:29 -0700 (PDT) Received: from apalos.home ([94.69.77.156]) by smtp.gmail.com with ESMTPSA id lr15sm13734709ejb.107.2021.05.12.02.50.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 May 2021 02:50:28 -0700 (PDT) Date: Wed, 12 May 2021 12:50:22 +0300 From: Ilias Apalodimas To: Eric Dumazet Cc: Matteo Croce , netdev@vger.kernel.org, linux-mm@kvack.org, Ayush Sawal , Vinay Kumar Yadav , Rohit Maheshwari , "David S. Miller" , Jakub Kicinski , Thomas Petazzoni , Marcin Wojtas , Russell King , Mirko Lindner , Stephen Hemminger , Tariq Toukan , Jesper Dangaard Brouer , Alexei Starovoitov , Daniel Borkmann , John Fastabend , Boris Pismenny , Arnd Bergmann , Andrew Morton , "Peter Zijlstra (Intel)" , Vlastimil Babka , Yu Zhao , Will Deacon , Michel Lespinasse , Fenghua Yu , Roman Gushchin , Hugh Dickins , Peter Xu , Jason Gunthorpe , Jonathan Lemon , Alexander Lobakin , Cong Wang , wenxu , Kevin Hao , Jakub Sitnicki , Marco Elver , Willem de Bruijn , Miaohe Lin , Yunsheng Lin , Guillaume Nault , linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org, bpf@vger.kernel.org, Matthew Wilcox , Eric Dumazet , David Ahern , Lorenzo Bianconi , Saeed Mahameed , Andrew Lunn , Paolo Abeni , Sven Auhagen Subject: Re: [PATCH net-next v4 2/4] page_pool: Allow drivers to hint on SKB recycling Message-ID: References: <20210511133118.15012-1-mcroce@linux.microsoft.com> <20210511133118.15012-3-mcroce@linux.microsoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [...] > > Since we added an extra argument on __skb_frag_unref() to handle > > recycling, update the current users of the function with that. > > This part could be done with a preliminary patch, only adding this > extra boolean, this would keep the 'complex' patch smaller. Sure [...] > > #include > > #include > > @@ -645,6 +648,11 @@ static void skb_free_head(struct sk_buff *skb) > > { > > unsigned char *head = skb->head; > > > > +#if IS_BUILTIN(CONFIG_PAGE_POOL) > > Why IS_BUILTIN() ? No reason, we'll replace it with an ifdef > > PAGE_POOL is either y or n > > IS_ENABLED() would look better, since we use IS_BUILTIN() for the cases where a module might be used. > > Or simply #ifdef CONFIG_PAGE_POOL > > > + if (skb->pp_recycle && page_pool_return_skb_page(head)) > > This probably should be attempted only in the (skb->head_frag) case ? I think the extra check makes sense. > > Also this patch misses pskb_expand_head() I am not sure I am following. Misses what? pskb_expand_head() will either call skb_release_data() or skb_free_head(), which would either recycle or unmap the buffer for us (depending on the page refcnt) [...] Thanks /Ilias