summaryrefslogtreecommitdiffstats
path: root/mm/compaction.c
diff options
context:
space:
mode:
authorIngo Molnar2016-05-12 09:18:13 +0200
committerIngo Molnar2016-05-12 09:18:13 +0200
commiteb60b3e5e8dfdd590e586a6fc22daf2f63a7b7e6 (patch)
tree1b06e2c1beca8f970685eb13096c7a12480526c6 /mm/compaction.c
parentsched/core: Fix comment typo in wake_q_add() (diff)
parentRevert "sched/fair: Fix fairness issue on migration" (diff)
downloadkernel-qcow2-linux-eb60b3e5e8dfdd590e586a6fc22daf2f63a7b7e6.tar.gz
kernel-qcow2-linux-eb60b3e5e8dfdd590e586a6fc22daf2f63a7b7e6.tar.xz
kernel-qcow2-linux-eb60b3e5e8dfdd590e586a6fc22daf2f63a7b7e6.zip
Merge branch 'sched/urgent' into sched/core to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'mm/compaction.c')
-rw-r--r--mm/compaction.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/mm/compaction.c b/mm/compaction.c
index ccf97b02b85f..8fa254043801 100644
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -852,16 +852,8 @@ isolate_migratepages_range(struct compact_control *cc, unsigned long start_pfn,
pfn = isolate_migratepages_block(cc, pfn, block_end_pfn,
ISOLATE_UNEVICTABLE);
- /*
- * In case of fatal failure, release everything that might
- * have been isolated in the previous iteration, and signal
- * the failure back to caller.
- */
- if (!pfn) {
- putback_movable_pages(&cc->migratepages);
- cc->nr_migratepages = 0;
+ if (!pfn)
break;
- }
if (cc->nr_migratepages == COMPACT_CLUSTER_MAX)
break;
@@ -1741,7 +1733,7 @@ void compaction_unregister_node(struct node *node)
static inline bool kcompactd_work_requested(pg_data_t *pgdat)
{
- return pgdat->kcompactd_max_order > 0;
+ return pgdat->kcompactd_max_order > 0 || kthread_should_stop();
}
static bool kcompactd_node_suitable(pg_data_t *pgdat)
@@ -1805,6 +1797,8 @@ static void kcompactd_do_work(pg_data_t *pgdat)
INIT_LIST_HEAD(&cc.freepages);
INIT_LIST_HEAD(&cc.migratepages);
+ if (kthread_should_stop())
+ return;
status = compact_zone(zone, &cc);
if (zone_watermark_ok(zone, cc.order, low_wmark_pages(zone),