cma: fix watermark checking
authorBartlomiej Zolnierkiewicz <[email protected]>
Mon, 8 Oct 2012 23:32:05 +0000 (16:32 -0700)
committerLinus Torvalds <[email protected]>
Tue, 9 Oct 2012 07:22:45 +0000 (16:22 +0900)
commitd95ea5d18e699515468368415c93ed49b1a3221b
tree5e4828e1ad279462c64c08dd305905e610418d90
parentd1ce749a0db12202b711d1aba1d29e823034648d
cma: fix watermark checking

* Add ALLOC_CMA alloc flag and pass it to [__]zone_watermark_ok()
  (from Minchan Kim).

* During watermark check decrease available free pages number by
  free CMA pages number if necessary (unmovable allocations cannot
  use pages from CMA areas).

Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]>
Signed-off-by: Kyungmin Park <[email protected]>
Cc: Marek Szyprowski <[email protected]>
Cc: Michal Nazarewicz <[email protected]>
Cc: Minchan Kim <[email protected]>
Cc: Mel Gorman <[email protected]>
Cc: Hugh Dickins <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
mm/compaction.c
mm/internal.h
mm/page_alloc.c