[PATCH net-next v4 4/5] page_pool: remove PP_FLAG_PAGE_FRAG flag
Jakub Kicinski
kuba at kernel.org
Wed Jun 14 10:19:54 PDT 2023
On Mon, 12 Jun 2023 21:02:55 +0800 Yunsheng Lin wrote:
> struct page_pool_params pp_params = {
> - .flags = PP_FLAG_DMA_MAP | PP_FLAG_PAGE_FRAG |
> - PP_FLAG_DMA_SYNC_DEV,
> + .flags = PP_FLAG_DMA_MAP | PP_FLAG_DMA_SYNC_DEV,
> .order = hns3_page_order(ring),
Does hns3_page_order() set a good example for the users?
static inline unsigned int hns3_page_order(struct hns3_enet_ring *ring)
{
#if (PAGE_SIZE < 8192)
if (ring->buf_size > (PAGE_SIZE / 2))
return 1;
#endif
return 0;
}
Why allocate order 1 pages for buffers which would fit in a single page?
I feel like this soft of heuristic should be built into the API itself.
More information about the Linux-mediatek
mailing list