page_pool: keep pp info as long as page pool owns the page
Currently, page->pp is cleared and set everytime the page is recycled, which is unnecessary. So only set the page->pp when the page is added to the page pool and only clear it when the page is released from the page pool. This is also a preparation to support allocating frag page in page pool. Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
committed by
Jakub Kicinski
parent
2a2b6e3640
commit
57f05bc2ab
@@ -253,11 +253,4 @@ static inline void page_pool_ring_unlock(struct page_pool *pool)
|
||||
spin_unlock_bh(&pool->ring.producer_lock);
|
||||
}
|
||||
|
||||
/* Store mem_info on struct page and use it while recycling skb frags */
|
||||
static inline
|
||||
void page_pool_store_mem_info(struct page *page, struct page_pool *pp)
|
||||
{
|
||||
page->pp = pp;
|
||||
}
|
||||
|
||||
#endif /* _NET_PAGE_POOL_H */
|
||||
|
||||
Reference in New Issue
Block a user