linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Li Xinhai <lixinhai.lxh@gmail.com>
Cc: linux-mm@kvack.org,
	"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
	Mike Kravetz <mike.kravetz@oracle.com>,
	Michal Hocko <mhocko@kernel.org>
Subject: Re: [PATCH v4] mm/page_vma_mapped.c: Explicitly compare pfn for normal, hugetlbfs and THP page
Date: Mon, 13 Jan 2020 14:38:20 -0800	[thread overview]
Message-ID: <20200113143820.3707ae928234e7abe64350a8@linux-foundation.org> (raw)
In-Reply-To: <1578737885-8890-1-git-send-email-lixinhai.lxh@gmail.com>

On Sat, 11 Jan 2020 10:18:05 +0000 Li Xinhai <lixinhai.lxh@gmail.com> wrote:

> When check_pte, pfn of normal, hugetlbfs and THP page need be compared.
> The current implementation apply comparison as
> - normal 4K page: page_pfn <= pfn < page_pfn + 1
> - hugetlbfs page:  page_pfn <= pfn < page_pfn + HPAGE_PMD_NR
> - THP page: page_pfn <= pfn < page_pfn + HPAGE_PMD_NR
> in pfn_in_hpage. For hugetlbfs page, it should be
> page_pfn == pfn

Does this have any runtime effects?

> Now, change pfn_in_hpage to pfn_is_match to highlight that comparison
> is not only for THP and explicitly compare for these cases.


  reply	other threads:[~2020-01-13 22:38 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-11 10:18 [PATCH v4] mm/page_vma_mapped.c: Explicitly compare pfn for normal, hugetlbfs and THP page Li Xinhai
2020-01-13 22:38 ` Andrew Morton [this message]
2020-01-14 14:24   ` Li Xinhai
2020-01-14  9:25 ` Michal Hocko
2020-01-14 13:47   ` Li Xinhai
2020-01-15  9:31     ` Michal Hocko
2020-01-16  0:40       ` Mike Kravetz
2020-01-16 10:29         ` Michal Hocko
2020-09-02 22:26           ` Yang Shi
2020-09-03  8:02             ` Michal Hocko
2020-09-03 16:08               ` Yang Shi
2020-09-04  1:22                 ` Yang Shi

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=20200113143820.3707ae928234e7abe64350a8@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-mm@kvack.org \
    --cc=lixinhai.lxh@gmail.com \
    --cc=mhocko@kernel.org \
    --cc=mike.kravetz@oracle.com \
    /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).