From: Wei Yang <richard.weiyang@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Linux-MM <linux-mm@kvack.org>
Subject: Re: [PATCH 1/2] mm/mlock: not handle NULL vma specially
Date: Sun, 8 May 2022 05:56:15 +0800 [thread overview]
Message-ID: <CADZGycaK85A4A_mzXvZ2EvO2zmhDzfc88vX=yQ6dT2JLy8xvCg@mail.gmail.com> (raw)
In-Reply-To: <20220507140346.e6e44657af1c98fea411239c@linux-foundation.org>
On Sun, May 8, 2022 at 5:03 AM Andrew Morton <akpm@linux-foundation.org> wrote:
>
> On Wed, 4 May 2022 00:39:57 +0000 Wei Yang <richard.weiyang@gmail.com> wrote:
>
> > If we can't find a proper vma, the loop would terminate as expected.
> >
> > It's not necessary to handle it specially.
> >
> > ...
> >
> > --- a/mm/mlock.c
> > +++ b/mm/mlock.c
> > @@ -504,11 +504,7 @@ static unsigned long count_mm_mlocked_page_nr(struct mm_struct *mm,
> > if (mm == NULL)
> > mm = current->mm;
> >
> > - vma = find_vma(mm, start);
> > - if (vma == NULL)
> > - return 0;
> > -
> > - for (; vma ; vma = vma->vm_next) {
> > + for (vma = find_vma(mm, start); vma ; vma = vma->vm_next) {
> > if (start >= vma->vm_end)
> > continue;
> > if (start + len <= vma->vm_start)
>
> The mapletree patches mangle this code a lot.
>
> Please take a look at linux-next or the mm-unstabe branch at
> git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm early to mid next
> week, see if you see anything which should be addressed.
>
I took a look at mm-unstabe branch with last commit
2b58b3f33ba2 mm/shmem: convert shmem_swapin_page() to shmem_swapin_folio()
Function count_mm_mlocked_page_nr() looks not changed.
Do I need to rebase on top of it?
next prev parent reply other threads:[~2022-05-07 21:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-04 0:39 Wei Yang
2022-05-04 0:39 ` [PATCH 2/2] mm/mlock: start is always smaller then vm_end Wei Yang
2022-05-07 21:03 ` [PATCH 1/2] mm/mlock: not handle NULL vma specially Andrew Morton
2022-05-07 21:56 ` Wei Yang [this message]
2022-05-07 22:44 ` Andrew Morton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CADZGycaK85A4A_mzXvZ2EvO2zmhDzfc88vX=yQ6dT2JLy8xvCg@mail.gmail.com' \
--to=richard.weiyang@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=linux-mm@kvack.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox