Skip to contentSkip to conversation

compaction: fix deferring compaction mistake

PATCH In review Minchan Kim 3 participants 3 messages Aug 8, 2012 – Aug 9, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 compaction: fix deferring compaction mistake

[1] fixed bad deferring policy but made mistake about checking compact_order_failed in __compact_pgdat so it can't update compact_order_failed with new order. It ends up preventing working of deffering policy rightly. This patch fixes it.

[1] aff62249, vmscan: only defer compaction for failed order and higher

Cc Rik van Riel <[email protected]>
Cc Mel Gorman <[email protected]>
---
 mm/compaction.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mm/compaction.c +1 -1
index e78cb96..b6984e2 100644
@@ -861,7 +861,7 @@ static int __compact_pgdat(pg_data_t *pgdat, struct compact_control *cc)
 		if (cc->order > 0) {
 			int ok = zone_watermark_ok(zone, cc->order,
 						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;
 			/* Currently async compaction is never deferred. */
 			else if (!ok && cc->sync)
Signature · 1 line
1.7.9.5
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Minchan Kim

[1] fixed bad deferring policy but made mistake about checking compact_order_failed in __compact_pgdat so it can't update compact_order_failed with new order. It ends up preventing working of deffering policy rightly. This patch fixes it.

Good catch.

Quoted 5 lines

[1] aff62249, vmscan: only defer compaction for failed order and higher

Cc Rik van Riel <[email protected]>
Cc Mel Gorman <[email protected]>

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

Acked-by on v1 1/1
#2 lore raw
In reply to Minchan Kim
Quoted 10 lines · Minchan Kim

[1] fixed bad deferring policy but made mistake about checking compact_order_failed in __compact_pgdat so it can't update compact_order_failed with new order. It ends up preventing working of deffering policy rightly. This patch fixes it.

[1] aff62249, vmscan: only defer compaction for failed order and higher

Cc Rik van Riel <[email protected]>
Cc Mel Gorman <[email protected]>
Signature · 8 lines
Mel Gorman
SUSE Labs

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>