Skip to content

Commit

Permalink
mm: compaction: correct the nr_strict va isolated check for CMA
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
Mel Gorman authored and torvalds committed Oct 19, 2012
1 parent bac7169 commit 0db63d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mm/compaction.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0db63d7

Please sign in to comment.