lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <062768e0-90d6-33dc-162a-c4adaa612f67@linux.dev>
Date: Tue, 18 Jul 2023 07:59:47 +0800
From: Zhu Yanjun <yanjun.zhu@...ux.dev>
To: Haiyang Zhang <haiyangz@...rosoft.com>,
 Jesper Dangaard Brouer <jbrouer@...hat.com>, Jakub Kicinski <kuba@...nel.org>
Cc: "brouer@...hat.com" <brouer@...hat.com>,
 "linux-hyperv@...r.kernel.org" <linux-hyperv@...r.kernel.org>,
 "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
 Dexuan Cui <decui@...rosoft.com>, KY Srinivasan <kys@...rosoft.com>,
 Paul Rosswurm <paulros@...rosoft.com>, "olaf@...fle.de" <olaf@...fle.de>,
 "vkuznets@...hat.com" <vkuznets@...hat.com>,
 "davem@...emloft.net" <davem@...emloft.net>,
 "wei.liu@...nel.org" <wei.liu@...nel.org>,
 "edumazet@...gle.com" <edumazet@...gle.com>,
 "pabeni@...hat.com" <pabeni@...hat.com>, "leon@...nel.org"
 <leon@...nel.org>, Long Li <longli@...rosoft.com>,
 "ssengar@...ux.microsoft.com" <ssengar@...ux.microsoft.com>,
 "linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>,
 "daniel@...earbox.net" <daniel@...earbox.net>,
 "john.fastabend@...il.com" <john.fastabend@...il.com>,
 "bpf@...r.kernel.org" <bpf@...r.kernel.org>, "ast@...nel.org"
 <ast@...nel.org>, Ajay Sharma <sharmaajay@...rosoft.com>,
 "hawk@...nel.org" <hawk@...nel.org>, "tglx@...utronix.de"
 <tglx@...utronix.de>,
 "shradhagupta@...ux.microsoft.com" <shradhagupta@...ux.microsoft.com>,
 "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
 Ilias Apalodimas <ilias.apalodimas@...aro.org>
Subject: Re: RE: [PATCH net-next] net: mana: Add page pool for RX buffers

在 2023/7/14 20:51, Haiyang Zhang 写道:
> 
> 
>> -----Original Message-----
>> From: Jesper Dangaard Brouer <jbrouer@...hat.com>
>> On 14/07/2023 05.53, Jakub Kicinski wrote:
>>> On Thu, 13 Jul 2023 14:48:45 +0000 Haiyang Zhang wrote:
>>>> Add page pool for RX buffers for faster buffer cycle and reduce CPU
>>>> usage.
>>>>
>>>> Get an extra ref count of a page after allocation, so after upper
>>>> layers put the page, it's still referenced by the pool. We can reuse
>>>> it as RX buffer without alloc a new page.
>>>
>>> Please use the real page_pool API from include/net/page_pool.h
>>> We've moved past every driver reinventing the wheel, sorry.
>>
>> +1
>>
>> Quoting[1]: Documentation/networking/page_pool.rst
>>
>>    Basic use involves replacing alloc_pages() calls with the
>> page_pool_alloc_pages() call.
>>    Drivers should use page_pool_dev_alloc_pages() replacing
>> dev_alloc_pages().
>   
> Thank Jakub and Jesper for the reviews.
> I'm aware of the page_pool.rst doc, and actually tried it before this
> patch, but I got lower perf. If I understand correctly, we should call
> page_pool_release_page() before passing the SKB to napi_gro_receive().
> 

If I get this commit correctly, this commit is to use page pool to get 
better performance.

IIRC, folio is to make memory optimization. From the performance 
results, with folio, the performance will get about 10%.

So not sure if the folio can be used in this commit to get better 
performance.

That is my 2 cent.

Zhu Yanjun

> I found the page_pool_dev_alloc_pages() goes through the slow path,
> because the page_pool_release_page() let the page leave the pool.
> 
> Do we have to call page_pool_release_page() before passing the SKB
> to napi_gro_receive()? Any better way to recycle the pages from the
> upper layer of non-XDP case?
> 
> Thanks,
> - Haiyang
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ