[PATCH net-next v12 04/14] mm: page_frag: add '_va' suffix to page_frag API

Alexander Duyck alexander.duyck at gmail.com
Wed Jul 31 11:13:54 PDT 2024


On Wed, Jul 31, 2024 at 5:50 AM Yunsheng Lin <linyunsheng at huawei.com> wrote:
>
> Currently the page_frag API is returning 'virtual address'
> or 'va' when allocing and expecting 'virtual address' or
> 'va' as input when freeing.
>
> As we are about to support new use cases that the caller
> need to deal with 'struct page' or need to deal with both
> 'va' and 'struct page'. In order to differentiate the API
> handling between 'va' and 'struct page', add '_va' suffix
> to the corresponding API mirroring the page_pool_alloc_va()
> API of the page_pool. So that callers expecting to deal with
> va, page or both va and page may call page_frag_alloc_va*,
> page_frag_alloc_pg*, or page_frag_alloc* API accordingly.
>
> CC: Alexander Duyck <alexander.duyck at gmail.com>
> Signed-off-by: Yunsheng Lin <linyunsheng at huawei.com>
> Reviewed-by: Subbaraya Sundeep <sbhatta at marvell.com>

I am naking this patch. It is a pointless rename that is just going to
obfuscate the git history for these callers.

As I believe I said before I would prefer to see this work more like
the handling of __get_free_pages and __free_pages in terms of the use
of pages versus pointers and/or longs. Pushing this API aside because
you want to reuse the name for something different isn't a valid
reason to rename an existing API and will just lead to confusion.



More information about the Linux-mediatek mailing list