All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tariq Toukan <ttoukan.linux@gmail.com>
To: Matteo Croce <mcroce@linux.microsoft.com>,
	David Ahern <dsahern@gmail.com>
Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org>,
	Yunsheng Lin <linyunsheng@huawei.com>,
	netdev@vger.kernel.org, linux-mm@kvack.org,
	Ayush Sawal <ayush.sawal@chelsio.com>,
	Vinay Kumar Yadav <vinay.yadav@chelsio.com>,
	Rohit Maheshwari <rohitm@chelsio.com>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	Marcin Wojtas <mw@semihalf.com>,
	Russell King <linux@armlinux.org.uk>,
	Mirko Lindner <mlindner@marvell.com>,
	Stephen Hemminger <stephen@networkplumber.org>,
	Tariq Toukan <tariqt@nvidia.com>,
	Jesper Dangaard Brouer <hawk@kernel.org>,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	John Fastabend <john.fastabend@gmail.com>,
	Boris Pismenny <borisp@nvidia.com>, Arnd Bergmann <arnd@arndb.de>,
	Andrew Morton <akpm@linux-foundation.org>,
	"Peter Zijlstra (Intel)" <peterz@infradead.org>,
	Vlastimil Babka <vbabka@suse.cz>, Yu Zhao <yuzhao@google.com>,
	Will Deacon <will@kernel.org>, Fenghua Yu <fenghua.yu@intel.com>,
	Roman Gushchin <guro@fb.com>, Hugh Dickins <hughd@google.com>,
	Peter Xu <peterx@redhat.com>, Jason Gunthorpe <jgg@ziepe.ca>,
	Jonathan Lemon <jonathan.lemon@gmail.com>,
	Alexander Lobakin <alobakin@pm.me>,
	Cong Wang <cong.wang@bytedance.com>, wenxu <wenxu@ucloud.cn>,
	Kevin Hao <haokexin@gmail.com>,
	Jakub Sitnicki <jakub@cloudflare.com>,
	Marco Elver <elver@google.com>,
	Willem de Bruijn <willemb@google.com>,
	Miaohe Lin <linmiaohe@huawei.com>,
	Guillaume Nault <gnault@redhat.com>,
	linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org,
	bpf@vger.kernel.org, Matthew Wilcox <willy@infradead.org>,
	Eric Dumazet <edumazet@google.com>,
	Lorenzo Bianconi <lorenzo@kernel.org>,
	Saeed Mahameed <saeedm@nvidia.com>, Andrew Lunn <andrew@lunn.ch>,
	Paolo Abeni <pabeni@redhat.com>,
	Sven Auhagen <sven.auhagen@voleatech.de>
Subject: Re: [PATCH net-next v6 3/5] page_pool: Allow drivers to hint on SKB recycling
Date: Sun, 6 Jun 2021 16:56:34 +0300	[thread overview]
Message-ID: <63a4ea45-9938-3106-9eda-0f7e8fe079ce@gmail.com> (raw)
In-Reply-To: <CAFnufp3rWwFgknBUBy9mHB36zpTKRiTeUAFeJXKVvp2DzvG3bw@mail.gmail.com>



On 6/5/2021 7:34 PM, Matteo Croce wrote:
> On Sat, Jun 5, 2021 at 6:06 PM David Ahern <dsahern@gmail.com> wrote:
>>
>> On 6/4/21 2:42 AM, Ilias Apalodimas wrote:
>>> [...]
>>>>> +   /* Driver set this to memory recycling info. Reset it on recycle.
>>>>> +    * This will *not* work for NIC using a split-page memory model.
>>>>> +    * The page will be returned to the pool here regardless of the
>>>>> +    * 'flipped' fragment being in use or not.
>>>>> +    */
>>>>
>>>> I am not sure I understand how does the last part of comment related
>>>> to the code below, as there is no driver using split-page memory model
>>>> will reach here because those driver will not call skb_mark_for_recycle(),
>>>> right?
>>>>
>>>
>>> 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.

Regards,
Tariq

  reply	other threads:[~2021-06-06 13:57 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-21 16:15 [PATCH net-next v6 0/5] page_pool: recycle buffers Matteo Croce
2021-05-21 16:15 ` [PATCH net-next v6 1/5] mm: add a signature in struct page Matteo Croce
2021-05-21 16:15 ` [PATCH net-next v6 2/5] skbuff: add a parameter to __skb_frag_unref Matteo Croce
2021-05-21 16:15 ` [PATCH net-next v6 3/5] page_pool: Allow drivers to hint on SKB recycling Matteo Croce
2021-06-03 18:45   ` Matteo Croce
2021-06-03 18:45     ` Matteo Croce
2021-06-04  7:52   ` Yunsheng Lin
2021-06-04  8:42     ` Ilias Apalodimas
2021-06-05 16:06       ` David Ahern
2021-06-05 16:34         ` Matteo Croce
2021-06-05 16:34           ` Matteo Croce
2021-06-06 13:56           ` Tariq Toukan [this message]
2021-06-07  4:38             ` Ilias Apalodimas
2021-06-07 11:14               ` Tariq Toukan
2021-06-07  4:35         ` Ilias Apalodimas
2021-05-21 16:15 ` [PATCH net-next v6 4/5] mvpp2: recycle buffers Matteo Croce
2021-05-21 16:15 ` [PATCH net-next v6 5/5] mvneta: " Matteo Croce
2021-05-28  0:44 ` [PATCH net-next v6 0/5] page_pool: " Matteo Croce
2021-05-28  0:44   ` Matteo Croce

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=63a4ea45-9938-3106-9eda-0f7e8fe079ce@gmail.com \
    --to=ttoukan.linux@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=alobakin@pm.me \
    --cc=andrew@lunn.ch \
    --cc=arnd@arndb.de \
    --cc=ast@kernel.org \
    --cc=ayush.sawal@chelsio.com \
    --cc=borisp@nvidia.com \
    --cc=bpf@vger.kernel.org \
    --cc=cong.wang@bytedance.com \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=dsahern@gmail.com \
    --cc=edumazet@google.com \
    --cc=elver@google.com \
    --cc=fenghua.yu@intel.com \
    --cc=gnault@redhat.com \
    --cc=guro@fb.com \
    --cc=haokexin@gmail.com \
    --cc=hawk@kernel.org \
    --cc=hughd@google.com \
    --cc=ilias.apalodimas@linaro.org \
    --cc=jakub@cloudflare.com \
    --cc=jgg@ziepe.ca \
    --cc=john.fastabend@gmail.com \
    --cc=jonathan.lemon@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linmiaohe@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=linyunsheng@huawei.com \
    --cc=lorenzo@kernel.org \
    --cc=mcroce@linux.microsoft.com \
    --cc=mlindner@marvell.com \
    --cc=mw@semihalf.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=peterx@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rohitm@chelsio.com \
    --cc=saeedm@nvidia.com \
    --cc=stephen@networkplumber.org \
    --cc=sven.auhagen@voleatech.de \
    --cc=tariqt@nvidia.com \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=vbabka@suse.cz \
    --cc=vinay.yadav@chelsio.com \
    --cc=wenxu@ucloud.cn \
    --cc=will@kernel.org \
    --cc=willemb@google.com \
    --cc=willy@infradead.org \
    --cc=yuzhao@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.