diff options
author | Minchan Kim <minchan@kernel.org> | 2012-08-21 19:16:03 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-08-21 19:45:03 -0400 |
commit | c81758fbe0fdbbc0c74b37798f55bd9c91d5c068 (patch) | |
tree | 5f25b6a2220c5e358e278681d6edc734b87288c3 /mm/compaction.c | |
parent | 7838f994b4fceff24c343f4e26a6cf4393869579 (diff) |
mm/compaction.c: fix deferring compaction mistake
Commit aff622495c9a ("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>
Diffstat (limited to 'mm/compaction.c')
-rw-r--r-- | mm/compaction.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/compaction.c b/mm/compaction.c index e78cb9688421..b6984e234fdf 100644 --- a/mm/compaction.c +++ b/mm/compaction.c | |||
@@ -861,7 +861,7 @@ static int __compact_pgdat(pg_data_t *pgdat, struct compact_control *cc) | |||
861 | if (cc->order > 0) { | 861 | if (cc->order > 0) { |
862 | int ok = zone_watermark_ok(zone, cc->order, | 862 | int ok = zone_watermark_ok(zone, cc->order, |
863 | low_wmark_pages(zone), 0, 0); | 863 | low_wmark_pages(zone), 0, 0); |
864 | if (ok && cc->order > zone->compact_order_failed) | 864 | if (ok && cc->order >= zone->compact_order_failed) |
865 | zone->compact_order_failed = cc->order + 1; | 865 | zone->compact_order_failed = cc->order + 1; |
866 | /* Currently async compaction is never deferred. */ | 866 | /* Currently async compaction is never deferred. */ |
867 | else if (!ok && cc->sync) | 867 | else if (!ok && cc->sync) |