Linux-mm Archive on lore.kernel.org
 help / color / Atom feed
From: "Kirill A. Shutemov" <kirill@shutemov.name>
To: Wei Yang <richardw.yang@linux.intel.com>
Cc: akpm@linux-foundation.org, kirill.shutemov@linux.intel.com,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] mm/page_vma_mapped: page table boundary is already guaranteed
Date: Thu, 28 Nov 2019 11:31:43 +0300
Message-ID: <20191128083143.kwih655snxqa2qnm@box.shutemov.name> (raw)
In-Reply-To: <20191128010321.21730-2-richardw.yang@linux.intel.com>

On Thu, Nov 28, 2019 at 09:03:21AM +0800, Wei Yang wrote:
> The check here is to guarantee pvmw->address iteration is limited in one
> page table boundary. To be specific, here the address range should be in
> one PMD_SIZE.
> 
> If my understanding is correct, this check is already done in the above
> check:
> 
>     address >= __vma_address(page, vma) + PMD_SIZE
> 
> The boundary check here seems not necessary.
> 
> Signed-off-by: Wei Yang <richardw.yang@linux.intel.com>

NAK.

THP can be mapped with PTE not aligned to PMD_SIZE. Consider mremap().

> Test:
>    more than 48 hours kernel build test shows this code is not touched.

Not an argument. I doubt mremap(2) is ever called in kernel build
workload.

-- 
 Kirill A. Shutemov


  reply index

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-28  1:03 [PATCH 1/2] mm/page_vma_mapped: use PMD_SIZE instead of calculating it Wei Yang
2019-11-28  1:03 ` [PATCH 2/2] mm/page_vma_mapped: page table boundary is already guaranteed Wei Yang
2019-11-28  8:31   ` Kirill A. Shutemov [this message]
2019-11-28 21:09     ` Wei Yang
2019-11-28 22:39       ` Matthew Wilcox
2019-11-29  8:30         ` Wei Yang
2019-11-29 11:18           ` Matthew Wilcox
2019-12-02  6:53             ` Wei Yang
2019-11-28  8:32 ` [PATCH 1/2] mm/page_vma_mapped: use PMD_SIZE instead of calculating it Kirill A. Shutemov
2019-11-28 21:22   ` Wei Yang
2019-12-02  8:03     ` Kirill A. Shutemov
2019-12-02  8:54       ` Wei Yang
2019-12-02 22:21       ` Wei Yang
2019-12-03  9:47         ` Kirill A. Shutemov
2019-12-03 15:14           ` Wei Yang

Reply instructions:

You may reply publically 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=20191128083143.kwih655snxqa2qnm@box.shutemov.name \
    --to=kirill@shutemov.name \
    --cc=akpm@linux-foundation.org \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=richardw.yang@linux.intel.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

Linux-mm Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-mm/0 linux-mm/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-mm linux-mm/ https://lore.kernel.org/linux-mm \
		linux-mm@kvack.org
	public-inbox-index linux-mm

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kvack.linux-mm


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git