aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMel Gorman <[email protected]>2012-10-19 13:56:57 -0700
committerLinus Torvalds <[email protected]>2012-10-19 14:07:47 -0700
commit0db63d7e25f96e2c6da925c002badf6f144ddf30 (patch)
treecf07c0f992a98cdaabac9bc7415f433ee8bbfdf4
parentbac716966094e39c8027428993a57b79f2dd6c97 (diff)
mm: compaction: correct the nr_strict va isolated check for CMA
Thierry reported that the "iron out" patch for isolate_freepages_block() had problems due to the strict check being too strict with "mm: compaction: Iron out isolate_freepages_block() and isolate_freepages_range() -fix1". It's possible that more pages than necessary are isolated but the check still fails and I missed that this fix was not picked up before RC1. This same problem has been identified in 3.7-RC1 by Tony Prisk and should be addressed by the following patch. Signed-off-by: Mel Gorman <[email protected]> Tested-by: Tony Prisk <[email protected]> Reported-by: Thierry Reding <[email protected]> Acked-by: Rik van Riel <[email protected]> Acked-by: Minchan Kim <[email protected]> Cc: Richard Davies <[email protected]> Cc: Shaohua Li <[email protected]> Cc: Avi Kivity <[email protected]> Cc: Arnd Bergmann <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r--mm/compaction.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/compaction.c b/mm/compaction.c
index 2c4ce17651d8..9eef55838fca 100644
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -346,7 +346,7 @@ static unsigned long isolate_freepages_block(struct compact_control *cc,
* pages requested were isolated. If there were any failures, 0 is
* returned and CMA will fail.
*/
- if (strict && nr_strict_required != total_isolated)
+ if (strict && nr_strict_required > total_isolated)
total_isolated = 0;
if (locked)