linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Ralph Campbell <rcampbell@nvidia.com>
To: <linux-mm@kvack.org>
Cc: linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org,
	dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org,
	"Ralph Campbell" <rcampbell@nvidia.com>,
	"Jérôme Glisse" <jglisse@redhat.com>,
	"Jason Gunthorpe" <jgg@mellanox.com>,
	"Christoph Hellwig" <hch@lst.de>
Subject: [PATCH v2 6/7] mm/hmm: remove hugetlbfs check in hmm_vma_walk_pmd
Date: Thu, 25 Jul 2019 17:56:49 -0700	[thread overview]
Message-ID: <20190726005650.2566-7-rcampbell@nvidia.com> (raw)
In-Reply-To: <20190726005650.2566-1-rcampbell@nvidia.com>

walk_page_range() will only call hmm_vma_walk_hugetlb_entry() for
hugetlbfs pages and doesn't call hmm_vma_walk_pmd() in this case.
Therefore, it is safe to remove the check for vma->vm_flags & VM_HUGETLB
in hmm_vma_walk_pmd().

Signed-off-by: Ralph Campbell <rcampbell@nvidia.com>
Cc: "Jérôme Glisse" <jglisse@redhat.com>
Cc: Jason Gunthorpe <jgg@mellanox.com>
Cc: Christoph Hellwig <hch@lst.de>
---
 mm/hmm.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/mm/hmm.c b/mm/hmm.c
index 838cd1d50497..29f322ca5d58 100644
--- a/mm/hmm.c
+++ b/mm/hmm.c
@@ -630,9 +630,6 @@ static int hmm_vma_walk_pmd(pmd_t *pmdp,
 	if (pmd_none(pmd))
 		return hmm_vma_walk_hole(start, end, walk);
 
-	if (pmd_huge(pmd) && (range->vma->vm_flags & VM_HUGETLB))
-		return hmm_pfns_bad(start, end, walk);
-
 	if (thp_migration_supported() && is_pmd_migration_entry(pmd)) {
 		bool fault, write_fault;
 		unsigned long npages;
-- 
2.20.1


  parent reply	other threads:[~2019-07-26  0:57 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-26  0:56 [PATCH v2 0/7] mm/hmm: more HMM clean up Ralph Campbell
2019-07-26  0:56 ` [PATCH v2 1/7] mm/hmm: replace hmm_update with mmu_notifier_range Ralph Campbell
2019-07-26  0:56 ` [PATCH v2 2/7] mm/hmm: a few more C style and comment clean ups Ralph Campbell
2019-07-26  6:23   ` Christoph Hellwig
2019-07-26 17:11     ` Ralph Campbell
2019-07-26  0:56 ` [PATCH v2 3/7] mm/hmm: replace the block argument to hmm_range_fault with a flags value Ralph Campbell
2019-07-26  0:56 ` [PATCH v2 4/7] mm: merge hmm_range_snapshot into hmm_range_fault Ralph Campbell
2019-07-26  0:56 ` [PATCH v2 5/7] mm/hmm: make full use of walk_page_range() Ralph Campbell
2019-07-26  6:24   ` Christoph Hellwig
2019-07-26 15:12   ` Jason Gunthorpe
2019-07-26  0:56 ` Ralph Campbell [this message]
2019-07-26  6:24   ` [PATCH v2 6/7] mm/hmm: remove hugetlbfs check in hmm_vma_walk_pmd Christoph Hellwig
2019-07-26  0:56 ` [PATCH v2 7/7] mm/hmm: remove hmm_range vma Ralph Campbell
2019-07-26  6:25   ` Christoph Hellwig
2019-07-26 15:45 ` [PATCH v2 0/7] mm/hmm: more HMM clean up Jason Gunthorpe

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=20190726005650.2566-7-rcampbell@nvidia.com \
    --to=rcampbell@nvidia.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hch@lst.de \
    --cc=jgg@mellanox.com \
    --cc=jglisse@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=nouveau@lists.freedesktop.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;
as well as URLs for NNTP newsgroup(s).