From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 98AD6C43461 for ; Wed, 12 May 2021 09:50:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 636FC613DF for ; Wed, 12 May 2021 09:50:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230292AbhELJvk (ORCPT ); Wed, 12 May 2021 05:51:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55820 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230240AbhELJvi (ORCPT ); Wed, 12 May 2021 05:51:38 -0400 Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 62482C061574 for ; Wed, 12 May 2021 02:50:30 -0700 (PDT) Received: by mail-ed1-x533.google.com with SMTP id a25so2179406edr.12 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=aFWhgdlOYIbsJ0UO5QGNfQHPiGhyP45JG2Z+Ro6iszsevTMHbOYPG1i1jtvuMpRN1K kt7XZGUUtwDjwF2l8sdIuo+gB0aIbu/4ICamNzkaq09HOsEen9UKH2+OumctmJ9yalIt w2MtFCFDOwZZvSNiMWjsM0jGrLZhphgvNkBZLrdT3GOHxPrAbLT3V7Eb9OJ1FU0ek7ub IwVCd1e6JVGCFj9ZuumPBax5S7g1FoJELoNdWFWpOigABQC5qspGdcrL8s3glrthpwnb pWtiieB1HQihRhIxDetqjebGF2lr5ET4ZKf30fK0Q2/x3hB75tVzhbZY3c9f3Y6MW70K ZOEA== X-Gm-Message-State: AOAM530wzVK2keB+diJuHH+ZMKYrfQefFPVVNuy37DKooy3upNDdwh1K c8w5+lcxxh0h8yjHcSoimmz+RA== X-Google-Smtp-Source: ABdhPJzmDSQCoBfSxpSFssN4vIeMUeoO4am9Wp3h0Kx3M7Nxh9kHKvhHuJYFuHxshsy6Fd+kEGp0lw== 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: netdev@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