lkml.org 
[lkml]   [2014]   [Dec]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/3] mm: page_isolation: remove unnecessary freepage_migratetype check for unused page
Date
when we test the pages in a range is free or not, there is a little
chance we encounter some page which is not in buddy but page_count is 0.
That means that page could be in the page-freeing path but not in the
buddy freelist, such as in pcplist or wait for the zone->lock which the
tester is holding.

Back to the freepage_migratetype, we use it for a cached value for decide
which free-list the page go when freeing page. If the pageblock is isolated
the page will go to free-list[MIGRATE_ISOLATE] even if the cached type is
not MIGRATE_ISOLATE, the commit ad53f92e(fix incorrect isolation behavior
by rechecking migratetype) patch series have ensure this.

So the freepage_migratetype check for page_count==0 page in
__test_page_isolated_in_pageblock() is meaningless.
This patch removes the unnecessary freepage_migratetype check.

Signed-off-by: Weijie Yang <weijie.yang@samsung.com>
---
mm/page_isolation.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/mm/page_isolation.c b/mm/page_isolation.c
index 6e5174d..f7c9183 100644
--- a/mm/page_isolation.c
+++ b/mm/page_isolation.c
@@ -223,8 +223,7 @@ __test_page_isolated_in_pageblock(unsigned long pfn, unsigned long end_pfn,
page = pfn_to_page(pfn);
if (PageBuddy(page))
pfn += 1 << page_order(page);
- else if (page_count(page) == 0 &&
- get_freepage_migratetype(page) == MIGRATE_ISOLATE)
+ else if (page_count(page) == 0)
pfn += 1;
else if (skip_hwpoisoned_pages && PageHWPoison(page)) {
/*
--
1.7.10.4



\
 
 \ /
  Last update: 2014-12-09 09:21    [W:0.042 / U:0.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site