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=-4.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no 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 B1D9DC47095 for ; Mon, 7 Jun 2021 11:14:18 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 51C2E61057 for ; Mon, 7 Jun 2021 11:14:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 51C2E61057 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 852BE6B006C; Mon, 7 Jun 2021 07:14:17 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 802E76B006E; Mon, 7 Jun 2021 07:14:17 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 655876B0070; Mon, 7 Jun 2021 07:14:17 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0226.hostedemail.com [216.40.44.226]) by kanga.kvack.org (Postfix) with ESMTP id 367046B006C for ; Mon, 7 Jun 2021 07:14:17 -0400 (EDT) Received: from smtpin05.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id CAC6FA2B9 for ; Mon, 7 Jun 2021 11:14:16 +0000 (UTC) X-FDA: 78226668912.05.415ECAF Received: from mail-ej1-f54.google.com (mail-ej1-f54.google.com [209.85.218.54]) by imf27.hostedemail.com (Postfix) with ESMTP id EBB1E801936B for ; Mon, 7 Jun 2021 11:14:13 +0000 (UTC) Received: by mail-ej1-f54.google.com with SMTP id c10so25954240eja.11 for ; Mon, 07 Jun 2021 04:14:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=7ACEmrf8lqyzWj1iuROjfn+lhLVzwVCH6LojGY7H628=; b=RCl/z9d6IftfWrwk+FiDXEW1F4Mn9b/AoqsKhGfflCHlNXvTJ9X7vqkXg7AnJ4pOOj o/VpRMuHVuKIdT8beFckHMwzGGwmrDRVwOdiVBRZjJqi5gxGjx3g38TBe1oKxBflbWZp LWb8CbXm1Mgz/28+iLRyJSNOFEES4p4Pr52NVOdG5nMToeDwr0OIOk1w1ZyuICd8bfDF XmKNvV5HZ2rWQoWxLsZLnFUxv4He3otR1Q1dek1YAyT9p/ugydwXu5LNCSqtL1nFkGj5 Tl+eUz5HV2mC+qj3eljITRiR9G34f9AcVuOys+Zq/0jiHeNanhlG841eL8H6JN2haIiS Qybw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=7ACEmrf8lqyzWj1iuROjfn+lhLVzwVCH6LojGY7H628=; b=IoCquA2U9/VHAg/3RMRAyJz1YaHx8Kr7RbwuLuJvPgrYooLlJfJCvrNPi2fCuCGcH1 xgkOFgiZ+SGFTZPKqP4IEq+jmaDSgo8yLqO1hhvtKgnRKTET9EH8I4FHBQW8uPImE6w0 RvyKjfmHBd/3poqGv/Buq0tJO7aGBFGcpWS2HOEE2xVqeHApdBlU1UeTyqbvl2c3+36w DHXc3/yK8lI+UkCuUzlELKI7GHa+xh9KODd1903LqrAQqgBnEXsKtFwULOVI3CnMvkx0 WQ70JYlhTTPD9kVCcDd8ZEzCFWgEsF7hWTzGOO6hcYnKweKGsqB4PTTVsWwYOpZktOhX NKLw== X-Gm-Message-State: AOAM533dEWRNApNClSlmMIj9ewvURjT6egAb2eFv2XEONR8BvYdyytTH VvYd8KjpJRTyS41mhjwv9P8= X-Google-Smtp-Source: ABdhPJzNG5U7CaGFJ2FroWgLRHUbZCTGdl28A+OP49yMVYxN4U/jR63PAV3SoCKJ/2fQz9vRC40ZsA== X-Received: by 2002:a17:906:9713:: with SMTP id k19mr17643598ejx.516.1623064455283; Mon, 07 Jun 2021 04:14:15 -0700 (PDT) Received: from [10.80.22.114] ([193.47.165.251]) by smtp.gmail.com with ESMTPSA id n15sm6383140ejz.36.2021.06.07.04.14.10 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 07 Jun 2021 04:14:14 -0700 (PDT) Subject: Re: [PATCH net-next v6 3/5] page_pool: Allow drivers to hint on SKB recycling To: Ilias Apalodimas Cc: Matteo Croce , David Ahern , Yunsheng Lin , 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 , 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 , Guillaume Nault , linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org, bpf@vger.kernel.org, Matthew Wilcox , Eric Dumazet , Lorenzo Bianconi , Saeed Mahameed , Andrew Lunn , Paolo Abeni , Sven Auhagen References: <20210521161527.34607-1-mcroce@linux.microsoft.com> <20210521161527.34607-4-mcroce@linux.microsoft.com> <722e5567-d8ee-228c-978e-9d5966257bb1@gmail.com> <63a4ea45-9938-3106-9eda-0f7e8fe079ce@gmail.com> From: Tariq Toukan Message-ID: Date: Mon, 7 Jun 2021 14:14:09 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: EBB1E801936B Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=gmail.com header.s=20161025 header.b="RCl/z9d6"; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf27.hostedemail.com: domain of ttoukanlinux@gmail.com designates 209.85.218.54 as permitted sender) smtp.mailfrom=ttoukanlinux@gmail.com X-Stat-Signature: mzbu8jyjpmhazmykqxchr91uyuinx3i1 X-HE-Tag: 1623064453-828499 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 6/7/2021 7:38 AM, Ilias Apalodimas wrote: > Hi Tariq, > >>>>> >>>>> Yes the comment is there to prohibit people (mlx5 only actually) to add the >>>>> recycling bit on their driver. Because if they do it will *probably* work >>>>> but they might get random corrupted packets which will be hard to debug. >>>>> >>>> >>>> What's the complexity for getting it to work with split page model? >>>> Since 1500 is the default MTU, requiring a page per packet means a lot >>>> of wasted memory. >>> >>> We could create a new memory model, e.g. MEM_TYPE_PAGE_SPLIT, and >>> restore the behavior present in the previous versions of this serie, >>> which is, save xdp_mem_info in struct page. >>> As this could slightly impact the performances, this can be added in a >>> future change when the drivers which are doing it want to use this >>> recycling api. >>> >> >> page-split model doesn't only help reduce memory waste, but increase >> cache-locality, especially for aggregated GRO SKBs. >> >> I'm looking forward to integrating the page-pool SKB recycling API into >> mlx5e datapath. For this we need it to support the page-split model. >> >> Let's see what's missing and how we can help making this happen. > > Yes that's the final goal. As I said I don't think adding the page split > model will fundamentally change the current patchset. So imho we should > get this in first, make sure that everything is fine, and then add code for > the mlx cards. > Sounds good