On Wed, Oct 9, 2019 at 6:10 PM Thomas HellstrÃm (VMware)
<thomas_os@xxxxxxxxxxxx> wrote:
Your original patch does exactly the same!Oh, no. You misread my original patch.
Look again.
The logic in my original patch was very different. It said that
- *if* we have a pmd_entry function, then we obviously call that one.
And if - after calling the pmd_entry function - we are still a
hugepage, then we skip the pte_entry case entirely.
And part of skipping is obviously "don't split" - but it never had
that "don't split and then call the pte walker" case.
- and if we *don't* have a pmd_entry function, but we do have a
pte_entry function, then we always split before calling it.
Notice the difference?
But I think the "change pmd_entry to have a sane return code" is a
simpler and more flexible model, and then the pmd_entry code can just
let the pte walker split the pmd if needed.
So I liked that part of your patch.
Linus