From 25a24406a11992d48c87eb82e50a0c4adb51a73d Mon Sep 17 00:00:00 2001 From: Johannes Weiner Date: Thu, 20 Jan 2011 14:44:21 -0800 Subject: [PATCH] --- yaml --- r: 232013 b: refs/heads/master c: 82478fb7bca28e3ca2f3c55c14e690f749dd4dbb h: refs/heads/master i: 232011: 4650d39a22c38eb2cd3c66cf28662dffda327d3f v: v3 --- [refs] | 2 +- trunk/mm/compaction.c | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 319a2b31766c..6cff62f04d38 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 3305de51bf612603c9a4e4dc98ceb839ef933749 +refs/heads/master: 82478fb7bca28e3ca2f3c55c14e690f749dd4dbb diff --git a/trunk/mm/compaction.c b/trunk/mm/compaction.c index 6d592a021072..8be430b812de 100644 --- a/trunk/mm/compaction.c +++ b/trunk/mm/compaction.c @@ -406,6 +406,10 @@ static int compact_finished(struct zone *zone, if (!zone_watermark_ok(zone, cc->order, watermark, 0, 0)) return COMPACT_CONTINUE; + /* + * order == -1 is expected when compacting via + * /proc/sys/vm/compact_memory + */ if (cc->order == -1) return COMPACT_CONTINUE; @@ -453,6 +457,13 @@ unsigned long compaction_suitable(struct zone *zone, int order) if (!zone_watermark_ok(zone, 0, watermark, 0, 0)) return COMPACT_SKIPPED; + /* + * order == -1 is expected when compacting via + * /proc/sys/vm/compact_memory + */ + if (order == -1) + return COMPACT_CONTINUE; + /* * fragmentation index determines if allocation failures are due to * low memory or external fragmentation