]> git.itanic.dy.fi Git - linux-stable/commit
page_pool: add frag page recycling support in page pool
authorYunsheng Lin <linyunsheng@huawei.com>
Fri, 6 Aug 2021 02:46:21 +0000 (10:46 +0800)
committerJakub Kicinski <kuba@kernel.org>
Mon, 9 Aug 2021 22:49:00 +0000 (15:49 -0700)
commit53e0961da1c7bbdabd1abebb20de403ec237ec09
tree32a5a011887e125b82ea63aa960028f307c1d2e2
parent0e9d2a0a3a836c37528899010e73b5be8111753e
page_pool: add frag page recycling support in page pool

Currently page pool only support page recycling when there
is only one user of the page, and the split page reusing
implemented in the most driver can not use the page pool as
bing-pong way of reusing requires the multi user support in
page pool.

Those reusing or recycling has below limitations:
1. page from page pool can only be used be one user in order
   for the page recycling to happen.
2. Bing-pong way of reusing in most driver does not support
   multi desc using different part of the same page in order
   to save memory.

So add multi-users support and frag page recycling in page
pool to overcome the above limitation.

Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/net/page_pool.h
net/core/page_pool.c