On 2025/12/14 14:55, [email protected] wrote:
From: Alex Shi<[email protected]>

'pmd_huge_pte' are pgtable variables, but used 'pgtable->lru'
instead of pgtable->pt_list in pgtable_trans_huge_deposit/withdraw
functions, That's a bit weird.

So let's convert the pgtable_t to precise 'struct ptdesc *' for
ptdesc->pmd_huge_pte, and mm->pmd_huge_pte, then convert function
pgtable_trans_huge_deposit() to use correct ptdesc.

This convertion works for most of arch, but failed on s390/sparc/powerpc
since they use 'pte_t *' as pgtable_t. Is there any suggestion for these
archs? If we could have a solution, we may remove the pgtable_t for other
archs.

If s390/sparc/powerpc can't align pgtable_t with others, we have to keep the pgtable_t to bridge different types. But we could take step to change pgtable_t as 'struct ptdesc *' in other archs. That could simplify and clarify related code too, isn't it?

Reply via email to