Subject: + page-owners-correct-page-order-when-to-free-page.patch added to -mm tree To: jungsoo.son@xxxxxxx,iamjoonsoo.kim@xxxxxxx,minchan@xxxxxxxxxx From: akpm@xxxxxxxxxxxxxxxxxxxx Date: Wed, 12 Mar 2014 13:03:50 -0700 The patch titled Subject: page owners: correct page->order when to free page has been added to the -mm tree. Its filename is page-owners-correct-page-order-when-to-free-page.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/page-owners-correct-page-order-when-to-free-page.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/page-owners-correct-page-order-when-to-free-page.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Jungsoo Son <jungsoo.son@xxxxxxx> Subject: page owners: correct page->order when to free page When I use PAGE_OWNER in mmotm tree, I found a problem that mismatches the number of allocated pages. When I investigate, the problem is that set_page_order is called for only a head page if freed page is merged to a higher order page in the buddy allocator so tail pages of the higher order page couldn't be reset to page->order = -1. It means when we do 'cat /proc/page-owner', it could show wrong information. So page->order should be set to -1 for all the tail pages as well as the first page before buddy allocator merges them. This patch is for clearing page->order of all the tail pages in free_pages_prepare() when to free page. Signed-off-by: Jungsoo Son <jungsoo.son@xxxxxxx> Cc: Joonsoo Kim <iamjoonsoo.kim@xxxxxxx> Acked-by: Minchan Kim <minchan@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/page_alloc.c | 7 +++++++ 1 file changed, 7 insertions(+) diff -puN mm/page_alloc.c~page-owners-correct-page-order-when-to-free-page mm/page_alloc.c --- a/mm/page_alloc.c~page-owners-correct-page-order-when-to-free-page +++ a/mm/page_alloc.c @@ -742,6 +742,13 @@ static bool free_pages_prepare(struct pa if (bad) return false; +#ifdef CONFIG_PAGE_OWNER + for (i = 0; i < (1 << order); i++) { + struct page *p = (page + i); + p->order = -1; + } +#endif + if (!PageHighMem(page)) { debug_check_no_locks_freed(page_address(page), PAGE_SIZE << order); _ Patches currently in -mm which might be from jungsoo.son@xxxxxxx are page-owners-correct-page-order-when-to-free-page.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html