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] [thread-next>] [day] [month] [year] [list]
Date: Thu, 29 Jun 2023 16:26:53 +0200
From: Alexander Lobakin <aleksander.lobakin@...el.com>
To: Yunsheng Lin <linyunsheng@...wei.com>
CC: <davem@...emloft.net>, <kuba@...nel.org>, <pabeni@...hat.com>,
	<netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>, Alexei Starovoitov
	<ast@...nel.org>, Daniel Borkmann <daniel@...earbox.net>, "Jesper Dangaard
 Brouer" <hawk@...nel.org>, John Fastabend <john.fastabend@...il.com>,
	"Matthias Brugger" <matthias.bgg@...il.com>, AngeloGioacchino Del Regno
	<angelogioacchino.delregno@...labora.com>, <bpf@...r.kernel.org>,
	<linux-arm-kernel@...ts.infradead.org>, <linux-mediatek@...ts.infradead.org>
Subject: Re: [PATCH v5 RFC 0/6] introduce page_pool_alloc() API

From: Yunsheng Lin <linyunsheng@...wei.com>
Date: Thu, 29 Jun 2023 20:02:20 +0800

> In [1] & [2] & [3], there are usecases for veth and virtio_net
> to use frag support in page pool to reduce memory usage, and it
> may request different frag size depending on the head/tail
> room space for xdp_frame/shinfo and mtu/packet size. When the
> requested frag size is large enough that a single page can not
> be split into more than one frag, using frag support only have
> performance penalty because of the extra frag count handling
> for frag support.
> 
> So this patchset provides a page pool API for the driver to
> allocate memory with least memory utilization and performance
> penalty when it doesn't know the size of memory it need
> beforehand.
> 
> 1. https://patchwork.kernel.org/project/netdevbpf/patch/d3ae6bd3537fbce379382ac6a42f67e22f27ece2.1683896626.git.lorenzo@kernel.org/
> 2. https://patchwork.kernel.org/project/netdevbpf/patch/20230526054621.18371-3-liangchen.linux@gmail.com/
> 3. https://github.com/alobakin/linux/tree/iavf-pp-frag

Thanks for sharing the link :D

> 
> v5 RFC: add a new page_pool_cache_alloc() API, and other minor
>         change as discussed in v4. As there seems to be three
>         comsumers that might be made use of the new API, so
>         repost it as RFC and CC the relevant authors to see
>         if the new API fits their need.

Tested v5 against my latest tree, no regressions, perf is even a bit
better than it was. That also might've come from that net-next pulled
Linus' tree with a good bunch of PRs already merged, or from v4 -> v5
update.

Re consumers, I'm planning to send the RFC series with IAVF as a
consumer on Monday (and a couple generic Page Pool improvements today,
will see).

> 
> V4. Fix a typo and add a patch to update document about frag
>     API, PAGE_POOL_DMA_USE_PP_FRAG_COUNT is not renamed yet
>     as we may need a different thread to discuss that.
> 
> V3: Incorporate changes from the disscusion with Alexander,
>     mostly the inline wraper, PAGE_POOL_DMA_USE_PP_FRAG_COUNT
>     change split to separate patch and comment change.
> V2: Add patch to remove PP_FLAG_PAGE_FRAG flags and mention
>     virtio_net usecase in the cover letter.
> V1: Drop RFC tag and page_pool_frag patch.
Thanks,
Olek

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ