Re: [PATCH 1/2] mm/hmm: a few more C style and comment clean ups

From: Jason Gunthorpe
Date: Tue Jul 23 2019 - 19:58:00 EST


On Tue, Jul 23, 2019 at 04:30:15PM -0700, Ralph Campbell wrote:
> - if (pmd_huge(pmd) && (range->vma->vm_flags & VM_HUGETLB))
> + if (pmd_huge(pmd) && is_vm_hugetlb_page(vma))
> return hmm_pfns_bad(start, end, walk);

This one is not a minor cleanup.. I think it should be done on its
own commit, and more comletely, maybe based on the below..

If vma is always the same as the the first vma, then your hunk above
here is much better than introducing a hugetlb flag as I did below..

Although I don't understand why we have this test when it does seem to
support huge pages, and the commit log suggests hugetlbfs was
deliberately supported. So a comment (or deletion) sure would be nice.

So maybe sequence this into your series?

Jason