Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 7e21c140 authored by Jungsoo Son's avatar Jungsoo Son Committed by Laura Abbott
Browse files

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.

Change-Id: Iec4385efb54d3074f70209b4f373714444bebb98
Signed-off-by: default avatarJungsoo Son <jungsoo.son@lge.com>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Acked-by: default avatarMinchan Kim <minchan@kernel.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Git-commit: 77255ec6960b14eef29eb1468dbef696c850420a
Git-repo: http://git.cmpxchg.org/cgit/linux-mmotm.git/


Signed-off-by: default avatarLaura Abbott <lauraa@codeaurora.org>
parent 4855b811
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment