(as a side note, cont-pte/cont-pmd should primarily be a hint from arch code
on how many entries we can batch, like we do in folio_pte_batch(); point is
that we want to batch also on architectures where we don't have such bits,
and prepare for architectures that implement various sizes of batching;
IMHO, having cont-pte/cont-pmd checks in common code is likely the wrong
approach. Again, folio_pte_batch() is where we tackled the problem
differently from the THP perspective)
I must say I did not check folio_pte_batch() and I am totally ignorant
of what/how it does things.
I will have a look.
I have an idea for a better page table walker API that would try batching
most entries (under one PTL), and walkers can just register for the types
they want. Hoping I will find some time to at least scetch the user
interface soon.
That doesn't mean that this should block your work, but the
cont-pte/cont/pmd hugetlb stuff is really nasty to handle here, and I don't
particularly like where this is going.
Ok, let me take a step back then.
Previous versions of that RFC did not handle cont-{pte-pmd} wide in the
open, so let me go back to the drawing board and come up with something
that does not fiddle with cont- stuff in that way.
I might post here a small diff just to see if we are on the same page.
As usual, thanks a lot for your comments David!