mm/compaction.c: fix deferring compaction mistake
Commit aff622495c
("vmscan: only defer compaction for failed order and
higher") fixed bad deferring policy but made mistake about checking
compact_order_failed in __compact_pgdat(). So it can't update
compact_order_failed with the new order. This ends up preventing
correct operation of policy deferral. This patch fixes it.
Signed-off-by: Minchan Kim <minchan@kernel.org>
Reviewed-by: Rik van Riel <riel@redhat.com>
Acked-by: Mel Gorman <mel@csn.ul.ie>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
7838f994b4
commit
c81758fbe0
|
@ -861,7 +861,7 @@ static int __compact_pgdat(pg_data_t *pgdat, struct compact_control *cc)
|
||||||
if (cc->order > 0) {
|
if (cc->order > 0) {
|
||||||
int ok = zone_watermark_ok(zone, cc->order,
|
int ok = zone_watermark_ok(zone, cc->order,
|
||||||
low_wmark_pages(zone), 0, 0);
|
low_wmark_pages(zone), 0, 0);
|
||||||
if (ok && cc->order > zone->compact_order_failed)
|
if (ok && cc->order >= zone->compact_order_failed)
|
||||||
zone->compact_order_failed = cc->order + 1;
|
zone->compact_order_failed = cc->order + 1;
|
||||||
/* Currently async compaction is never deferred. */
|
/* Currently async compaction is never deferred. */
|
||||||
else if (!ok && cc->sync)
|
else if (!ok && cc->sync)
|
||||||
|
|
Loading…
Reference in New Issue