Re: [PATCH net-next v17 03/14] mm: page_frag: use initial zero offset for page_frag_alloc_align()
From: Alexander Duyck <hidden>
Date: 2024-09-04 15:47:41
Also in:
linux-mm, lkml
From: Alexander Duyck <hidden>
Date: 2024-09-04 15:47:41
Also in:
linux-mm, lkml
On Mon, Sep 2, 2024 at 5:09 AM Yunsheng Lin [off-list ref] wrote:
We are about to use page_frag_alloc_*() API to not just allocate memory for skb->data, but also use them to do the memory allocation for skb frag too. Currently the implementation of page_frag in mm subsystem is running the offset as a countdown rather than count-up value, there may have several advantages to that as mentioned in [1], but it may have some disadvantages, for example, it may disable skb frag coalescing and more correct cache prefetching We have a trade-off to make in order to have a unified implementation and API for page_frag, so use a initial zero offset in this patch, and the following patch will try to make some optimization to avoid the disadvantages as much as possible. 1. https://lore.kernel.org/all/f4abe71b3439b39d17a6fb2d410180f367cadf5c.camel@gmail.com/ (local) CC: Alexander Duyck <redacted> Signed-off-by: Yunsheng Lin <redacted> --- mm/page_frag_cache.c | 46 ++++++++++++++++++++++---------------------- 1 file changed, 23 insertions(+), 23 deletions(-)
Reviewed-by: Alexander Duyck <alexanderduyck@fb.com>