Re: [PATCH v2 10/10] mm/hugetlb: Document why page_vma_mapped_walk() is safe to walk

From: Peter Xu
Date: Thu Dec 08 2022 - 19:44:48 EST


On Thu, Dec 08, 2022 at 04:24:19PM -0800, John Hubbard wrote:
> It does! And now for the comment, I'll think you'll find that this suffices:
>
> /*
> * All callers that get here will already hold the i_mmap_rwsem.
> * Therefore, no additional locks need to be taken before
> * calling hugetlb_walk().
> */
>
> ...which, considering all the data above, is probably the mother of
> all summaries. :) But really, it's all that people need to know here, and
> it's readily understandable without wondering what KSM has to do with this,
> for example.

I'm okay with the change. :)

I think what I'll do is I'll move part of the original one into commit
message, and take the new version in the code.

Thanks,

--
Peter Xu