[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHbLzkpTuTacnB-zes6H2dgy1Hb3roqkMGgUyrk8ULWf5TQhDA@mail.gmail.com>
Date: Tue, 16 Jan 2024 13:39:20 -0800
From: Yang Shi <shy828301@...il.com>
To: "Huang, Ying" <ying.huang@...el.com>
Cc: oliver.sang@...el.com, riel@...riel.com, fengwei.yin@...el.com,
willy@...radead.org, cl@...ux.com, akpm@...ux-foundation.org,
linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [PATCH 1/2] mm: mmap: no need to call khugepaged_enter_vma() for stack
On Sun, Jan 14, 2024 at 9:52 PM Huang, Ying <ying.huang@...el.com> wrote:
>
> Yang Shi <shy828301@...il.com> writes:
>
> > From: Yang Shi <yang@...amperecomputing.com>
> >
> > We avoid allocating THP for temporary stack, even tnough
> ~~~~~~
> though?
Yeah, it is a typo. Thanks for noticing this.
>
> --
> Best Regards,
> Huang, Ying
>
> > khugepaged_enter_vma() is called for stack VMAs, it actualy returns
> > false. So no need to call it in the first place at all.
> >
> > Signed-off-by: Yang Shi <yang@...amperecomputing.com>
> > ---
> > mm/mmap.c | 2 --
> > 1 file changed, 2 deletions(-)
> >
> > diff --git a/mm/mmap.c b/mm/mmap.c
> > index b78e83d351d2..2ff79b1d1564 100644
> > --- a/mm/mmap.c
> > +++ b/mm/mmap.c
> > @@ -2046,7 +2046,6 @@ static int expand_upwards(struct vm_area_struct *vma, unsigned long address)
> > }
> > }
> > anon_vma_unlock_write(vma->anon_vma);
> > - khugepaged_enter_vma(vma, vma->vm_flags);
> > mas_destroy(&mas);
> > validate_mm(mm);
> > return error;
> > @@ -2140,7 +2139,6 @@ int expand_downwards(struct vm_area_struct *vma, unsigned long address)
> > }
> > }
> > anon_vma_unlock_write(vma->anon_vma);
> > - khugepaged_enter_vma(vma, vma->vm_flags);
> > mas_destroy(&mas);
> > validate_mm(mm);
> > return error;
Powered by blists - more mailing lists