Re: [PATCH] mm/thp: Rename pmd_to_page() as pmd_pgtable_page()

From: Andrew Morton
Date: Thu Nov 24 2022 - 16:47:15 EST


On Thu, 24 Nov 2022 18:46:41 +0530 Anshuman Khandual <anshuman.khandual@xxxxxxx> wrote:

> Current pmd_to_page(), which derives the page table page containing the pmd
> address has a very misleading name. The problem being, it sounds similar to
> pmd_page() which derives page embedded in a given pmd entry either for next
> level page or a mapped huge page. Rename it as pmd_pgtable_page() instead.
>

Is the new name much clearer?

There are a zillion of these little conversion functions in the pagemap
layer, all quite confusing yet we seem to have decided that they are so
plainly obvious that no code commenting is needed. Sigh.