On 3/24/20 4:55 AM, Jason Gunthorpe wrote:
Also, since CH moved all the get_user_pages_fast code out of the arch's many/all archs can drop their arch specific version of this routine. This is really just a specialized version of gup_fast's algorithm..
(also the arch versions seem different, why do some return actual ptes, not null?)
Not sure I understand that last question. The return value should be a *pte or null.
/* * huge_pte_offset() - Walk the page table to resolve the hugepage * entry at address @addr * * Return: Pointer to page table or swap entry (PUD or PMD) for * address @addr, or NULL if a p*d_none() entry is encountered and the * size @sz doesn't match the hugepage size at this level of the page * table. */