Re: [PATCH net-next v5 10/13] mm: page_frag: introduce prepare/probe/commit API

From: Yunsheng Lin
Date: Thu May 30 2024 - 05:22:30 EST


On 2024/5/28 20:56, Yunsheng Lin wrote:

> +#define page_frag_alloc_probe(nc, offset, fragsz, va) \
> +({ \
> + struct page *__page = NULL; \
> + \
> + VM_BUG_ON(!*(fragsz)); \

The above above marco seems to need to include mmdebug.h explicitly
to avoid compile error for x86 system.


> + if (likely((nc)->remaining >= *(fragsz))) \
> + __page = virt_to_page(__page_frag_alloc_probe(nc, \
> + offset, \
> + fragsz, \
> + va)); \
> + \
> + __page; \
> +})