On Mon, Dec 23, 2024 at 05:41:01PM +0800, Qi Zheng wrote:
Here we are explicitly dealing with struct page, and the following logic
semms strange:
tlb_remove_page_ptdesc((tlb), (page_ptdesc(pte)));
tlb_remove_page_ptdesc
--> tlb_remove_page(tlb, ptdesc_page(pt));
So remove tlb_remove_page_ptdesc() and make callers call tlb_remove_page()
directly.
Please don't. The ptdesc wrappers are there as a part of reducing the size
of struct page project [1].
For now struct ptdesc overlaps struct page, but the goal is to have them
separate and always operate on struct ptdesc when working with page tables.
[1] https://kernelnewbies.org/MatthewWilcox/Memdescs