]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mm: remain migratetype in freed page
authorMinchan Kim <minchan@kernel.org>
Wed, 26 Sep 2012 01:33:45 +0000 (11:33 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 26 Sep 2012 05:45:02 +0000 (15:45 +1000)
commitc8acad912e6a0bba81a5ddef25dbacd236179add
treedbc5063ab84b4da07884d752e8c6f97032ab7b5a
parentcfcbf77289ef6580ecbf7c6de6d9143f9d4e5cb3
mm: remain migratetype in freed page

The page allocator caches the pageblock information in page->private while
it is in the PCP freelists but this is overwritten with the order of the
page when freed to the buddy allocator.  This patch stores the migratetype
of the page in the page->index field so that it is available at all times
when the page remain in free_list.

This patch adds a new call site in __free_pages_ok so it might be overhead
a bit but it's for high order allocation.  So I believe damage isn't hurt.

Signed-off-by: Minchan Kim <minchan@kernel.org>
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Reviewed-by: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
Acked-by: Mel Gorman <mgorman@suse.de>
Cc: Xishi Qiu <qiuxishi@huawei.com>
Cc: Wen Congyang <wency@cn.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/mm.h
mm/page_alloc.c