linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] mm/migrate: clean up useless code in migrate_vma_collect_pmd()
@ 2019-08-06  8:00 Pingfan Liu
  2019-08-06  8:00 ` [PATCH 2/3] mm/migrate: see hole as invalid source page Pingfan Liu
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Pingfan Liu @ 2019-08-06  8:00 UTC (permalink / raw)
  To: linux-mm
  Cc: Pingfan Liu, Jérôme Glisse, Andrew Morton, Mel Gorman,
	Jan Kara, Kirill A. Shutemov, Michal Hocko, Mike Kravetz,
	Andrea Arcangeli, Matthew Wilcox, linux-kernel

Signed-off-by: Pingfan Liu <kernelfans@gmail.com>
Cc: "Jérôme Glisse" <jglisse@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Mel Gorman <mgorman@techsingularity.net>
Cc: Jan Kara <jack@suse.cz>
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Mike Kravetz <mike.kravetz@oracle.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Matthew Wilcox <willy@infradead.org>
To: linux-mm@kvack.org
Cc: linux-kernel@vger.kernel.org
---
 mm/migrate.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/mm/migrate.c b/mm/migrate.c
index 8992741..c2ec614 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -2230,7 +2230,6 @@ static int migrate_vma_collect_pmd(pmd_t *pmdp,
 		if (pte_none(pte)) {
 			mpfn = MIGRATE_PFN_MIGRATE;
 			migrate->cpages++;
-			pfn = 0;
 			goto next;
 		}
 
@@ -2255,7 +2254,6 @@ static int migrate_vma_collect_pmd(pmd_t *pmdp,
 			if (is_zero_pfn(pfn)) {
 				mpfn = MIGRATE_PFN_MIGRATE;
 				migrate->cpages++;
-				pfn = 0;
 				goto next;
 			}
 			page = vm_normal_page(migrate->vma, addr, pte);
@@ -2265,10 +2263,9 @@ static int migrate_vma_collect_pmd(pmd_t *pmdp,
 
 		/* FIXME support THP */
 		if (!page || !page->mapping || PageTransCompound(page)) {
-			mpfn = pfn = 0;
+			mpfn = 0;
 			goto next;
 		}
-		pfn = page_to_pfn(page);
 
 		/*
 		 * By getting a reference on the page we pin it and that blocks
-- 
2.7.5


^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2019-08-26  7:53 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-06  8:00 [PATCH 1/3] mm/migrate: clean up useless code in migrate_vma_collect_pmd() Pingfan Liu
2019-08-06  8:00 ` [PATCH 2/3] mm/migrate: see hole as invalid source page Pingfan Liu
2019-08-15 17:22   ` Jerome Glisse
2019-08-16 15:02     ` Pingfan Liu
2019-08-26  7:52       ` Pingfan Liu
2019-08-06  8:00 ` [PATCH 3/3] mm/migrate: remove the duplicated code migrate_vma_collect_hole() Pingfan Liu
2019-08-15 17:22   ` Jerome Glisse
2019-08-06 13:35 ` [PATCH 1/3] mm/migrate: clean up useless code in migrate_vma_collect_pmd() Matthew Wilcox
2019-08-07  5:28   ` Pingfan Liu
2019-08-07  8:41     ` [PATCHv2] " Pingfan Liu
2019-08-14 23:11       ` Ralph Campbell
2019-08-15 17:19       ` Jerome Glisse
2019-08-15 19:23         ` Ralph Campbell
2019-08-15 19:40           ` Jerome Glisse
2019-08-16 13:21             ` Pingfan Liu

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).