]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mm/page_alloc: DEBUG_VM checks for free_list placement of CMA and RESERVE pages
authorVlastimil Babka <vbabka@suse.cz>
Wed, 14 May 2014 00:02:19 +0000 (10:02 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 14 May 2014 00:02:19 +0000 (10:02 +1000)
commitc660fc0aa74f3943ff4f233fe945e396288ee71b
tree0a49980d1298df53dc64774ef2182f2fb7e1cfd4
parentf5953bb198c2538e3caf8805311a20b1b4bae569
mm/page_alloc: DEBUG_VM checks for free_list placement of CMA and RESERVE pages

For the MIGRATE_RESERVE pages, it is important they do not get misplaced
on free_list of other migratetype, otherwise the whole MIGRATE_RESERVE
pageblock might be changed to other migratetype in
try_to_steal_freepages().  For MIGRATE_CMA, the pages also must not go to
a different free_list, otherwise they could get allocated as unmovable and
result in CMA failure.

This is ensured by setting the freepage_migratetype appropriately when
placing pages on pcp lists, and using the information when releasing them
back to free_list.  It is also assumed that CMA and RESERVE pageblocks are
created only in the init phase.  This patch adds DEBUG_VM checks to catch
any regressions introduced for this invariant.

Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
Cc: Yong-Taek Lee <ytk.lee@samsung.com>
Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Acked-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Minchan Kim <minchan@kernel.org>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/mm.h
mm/page_alloc.c