|
@@ -1605,6 +1605,14 @@ static void __compact_pgdat(pg_data_t *pgdat, struct compact_control *cc)
|
|
INIT_LIST_HEAD(&cc->freepages);
|
|
INIT_LIST_HEAD(&cc->freepages);
|
|
INIT_LIST_HEAD(&cc->migratepages);
|
|
INIT_LIST_HEAD(&cc->migratepages);
|
|
|
|
|
|
|
|
+ /*
|
|
|
|
+ * When called via /proc/sys/vm/compact_memory
|
|
|
|
+ * this makes sure we compact the whole zone regardless of
|
|
|
|
+ * cached scanner positions.
|
|
|
|
+ */
|
|
|
|
+ if (cc->order == -1)
|
|
|
|
+ __reset_isolation_suitable(zone);
|
|
|
|
+
|
|
if (cc->order == -1 || !compaction_deferred(zone, cc->order))
|
|
if (cc->order == -1 || !compaction_deferred(zone, cc->order))
|
|
compact_zone(zone, cc);
|
|
compact_zone(zone, cc);
|
|
|
|
|