lkml.org 
[lkml]   [2017]   [Nov]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 3/3] mm, compaction: remove unneeded pageblock_skip_persistent() checks
Date
Commit f3c931633a59 ("mm, compaction: persistently skip hugetlbfs pageblocks")
has introduced pageblock_skip_persistent() checks into migration and free
scanners, to make sure pageblocks that should be persistently skipped are
marked as such, regardless of the ignore_skip_hint flag.

Since the previous patch introduced a new no_set_skip_hint flag, the ignore flag
no longer prevents marking pageblocks as skipped. Therefore we can remove the
special cases. The relevant pageblocks will be marked as skipped by the common
logic which marks each pageblock where no page could be isolated. This makes the
code simpler.

Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
---
mm/compaction.c | 18 +++---------------
1 file changed, 3 insertions(+), 15 deletions(-)

diff --git a/mm/compaction.c b/mm/compaction.c
index a92860d89679..b557aac09e92 100644
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -475,10 +475,7 @@ static unsigned long isolate_freepages_block(struct compact_control *cc,
if (PageCompound(page)) {
const unsigned int order = compound_order(page);

- if (pageblock_skip_persistent(page, order)) {
- set_pageblock_skip(page);
- blockpfn = end_pfn;
- } else if (likely(order < MAX_ORDER)) {
+ if (likely(order < MAX_ORDER)) {
blockpfn += (1UL << order) - 1;
cursor += (1UL << order) - 1;
}
@@ -800,10 +797,7 @@ isolate_migratepages_block(struct compact_control *cc, unsigned long low_pfn,
if (PageCompound(page)) {
const unsigned int order = compound_order(page);

- if (pageblock_skip_persistent(page, order)) {
- set_pageblock_skip(page);
- low_pfn = end_pfn;
- } else if (likely(order < MAX_ORDER))
+ if (likely(order < MAX_ORDER))
low_pfn += (1UL << order) - 1;
goto isolate_fail;
}
@@ -866,13 +860,7 @@ isolate_migratepages_block(struct compact_control *cc, unsigned long low_pfn,
* is safe to read and it's 0 for tail pages.
*/
if (unlikely(PageCompound(page))) {
- const unsigned int order = compound_order(page);
-
- if (pageblock_skip_persistent(page, order)) {
- set_pageblock_skip(page);
- low_pfn = end_pfn;
- } else
- low_pfn += (1UL << order) - 1;
+ low_pfn += (1UL << compound_order(page)) - 1;
goto isolate_fail;
}
}
--
2.14.3
\
 
 \ /
  Last update: 2017-11-02 13:17    [W:0.033 / U:0.488 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site