Re: [PATCH v4 8/8] hugetlb: batch TLB flushes when restoring vmemmap

From: Mike Kravetz
Date: Tue Sep 19 2023 - 17:54:50 EST


On 09/19/23 14:48, Muchun Song wrote:
>
>
> On 2023/9/19 07:02, Mike Kravetz wrote:
> > Update the internal hugetlb restore vmemmap code path such that TLB
> > flushing can be batched. Use the existing mechanism of passing the
> > VMEMMAP_REMAP_NO_TLB_FLUSH flag to indicate flushing should not be
> > performed for individual pages. The routine hugetlb_vmemmap_restore_folios
> > is the only user of this new mechanism, and it will perform a global
> > flush after all vmemmap is restored.
> >
> > Signed-off-by: Joao Martins <joao.m.martins@xxxxxxxxxx>
> > Signed-off-by: Mike Kravetz <mike.kravetz@xxxxxxxxxx>
> > ---
> > mm/hugetlb_vmemmap.c | 39 ++++++++++++++++++++++++---------------
> > 1 file changed, 24 insertions(+), 15 deletions(-)
> >
> > diff --git a/mm/hugetlb_vmemmap.c b/mm/hugetlb_vmemmap.c
> > index a6c356acb1fc..ae2229f19158 100644
> > --- a/mm/hugetlb_vmemmap.c
> > +++ b/mm/hugetlb_vmemmap.c
> > @@ -460,18 +460,19 @@ static int alloc_vmemmap_page_list(unsigned long start, unsigned long end,
> > * @end: end address of the vmemmap virtual address range that we want to
> > * remap.
> > * @reuse: reuse address.
> > + * @flags: modify behavior for bulk operations
>
> Please keep the comment consistent with vmemmap_remap_split(), which says:
> "@flags:    modifications to vmemmap_remap_walk flags".

Thanks, will change in next version.
--
Mike Kravetz