Re: [PATCH net-next v2 07/15] mm: page_frag: add '_va' suffix to page_frag API

From
Yunsheng Lin <hidden>
Date
2024-04-17 13:18:44
Also in
bpf, intel-wired-lan, kvm, linux-mediatek, linux-mm, linux-nfs, linux-nvme, lkml, netdev
Reply to
Alexander H Duyck, 2024-04-16
On 2024/4/17 0:12, Alexander H Duyck wrote:
On Mon, 2024-04-15 at 21:19 +0800, Yunsheng Lin wrote:
quoted
Currently most of the API for page_frag API is returning
'virtual address' as output or expecting 'virtual address'
as input, in order to differentiate the API handling between
'virtual address' and 'struct page', add '_va' suffix to the
corresponding API mirroring the page_pool_alloc_va() API of
the page_pool.

Signed-off-by: Yunsheng Lin <redacted>
This patch is a total waste of time. By that logic we should be
renaming __get_free_pages since it essentially does the same thing.

This just seems like more code changes for the sake of adding code
changes rather than fixing anything. In my opinion it should be dropped
from the set.
The rename is to support different use case as mentioned below in patch
14:
"Depending on different use cases, callers expecting to deal with va, page or
both va and page for them may call page_frag_alloc_va*, page_frag_alloc_pg*,
or page_frag_alloc* API accordingly."

Naming is hard anyway, I am open to better API naming for the above use cases.
.
Thread (3 messages) 3 messages, 2 authors, last reply 2024-04-17
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help