From: Andrew Morton <akpm@linux-foundation.org>
To: Mike Kravetz <mike.kravetz@oracle.com>
Cc: Huang Shijie <sjhuang@iluvatar.ai>,
kirill.shutemov@linux.intel.com, linux-mm@kvack.org
Subject: Re: [PATCH] mm:rmap: use the pra.mapcount to do the check
Date: Thu, 4 Apr 2019 17:09:07 -0700 [thread overview]
Message-ID: <20190404170907.878fecfaeb150098ea61a806@linux-foundation.org> (raw)
In-Reply-To: <de5865e2-a9e4-f0f9-f740-f1301679258a@oracle.com>
On Thu, 4 Apr 2019 16:08:33 -0700 Mike Kravetz <mike.kravetz@oracle.com> wrote:
> On 4/3/19 10:48 PM, Huang Shijie wrote:
> > We have the pra.mapcount already, and there is no need to call
> > the page_mapped() which may do some complicated computing
> > for compound page.
> >
> > Signed-off-by: Huang Shijie <sjhuang@iluvatar.ai>
>
> This looks good to me. I had to convince myself that there were no
> issues if we were operating on a sub-page of a compound-page. However,
> Kirill is the expert here and would know of any subtle issues I may have
> overlooked.
>
> --
> Mike Kravetz
>
> > ---
> > mm/rmap.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/mm/rmap.c b/mm/rmap.c
> > index 76c8dfd3ae1c..6c5843dddb5a 100644
> > --- a/mm/rmap.c
> > +++ b/mm/rmap.c
> > @@ -850,7 +850,7 @@ int page_referenced(struct page *page,
> > };
> >
> > *vm_flags = 0;
> > - if (!page_mapped(page))
> > + if (!pra.mapcount)
> > return 0;
> >
> > if (!page_rmapping(page))
> >
next prev parent reply other threads:[~2019-04-05 0:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-04 5:48 [PATCH] mm:rmap: use the pra.mapcount to do the check Huang Shijie
2019-04-04 23:08 ` Mike Kravetz
2019-04-05 0:09 ` Andrew Morton [this message]
2019-04-05 12:36 ` Kirill A. Shutemov
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=20190404170907.878fecfaeb150098ea61a806@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-mm@kvack.org \
--cc=mike.kravetz@oracle.com \
--cc=sjhuang@iluvatar.ai \
/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;
as well as URLs for NNTP newsgroup(s).