diff options
| author | Joonsoo Kim <iamjoonsoo.kim@lge.com> | 2016-07-26 15:23:49 -0700 |
|---|---|---|
| committer | Prakash Gupta <guptap@codeaurora.org> | 2017-07-07 15:39:31 +0530 |
| commit | df3b4bfcf99f855dbbfb81f17bcf5bb003983cd7 (patch) | |
| tree | dddf7e3da117d584f6268e8080fccec01a65fb23 /mm/page_owner.c | |
| parent | a6ea956cebf9902361f88fefd4091d1d61ed7597 (diff) | |
mm/page_owner: introduce split_page_owner and replace manual handling
split_page() calls set_page_owner() to set up page_owner to each pages.
But, it has a drawback that head page and the others have different
stacktrace because callsite of set_page_owner() is slightly differnt.
To avoid this problem, this patch copies head page's page_owner to the
others. It needs to introduce new function, split_page_owner() but it
also remove the other function, get_page_owner_gfp() so looks good to
do.
Change-Id: Ie946ccf7dc1e9eeacb03ac81720c178daa7db21e
Link: http://lkml.kernel.org/r/1464230275-25791-4-git-send-email-iamjoonsoo.kim@lge.com
Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Cc: Mel Gorman <mgorman@techsingularity.net>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Alexander Potapenko <glider@google.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Michal Hocko <mhocko@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Git-commit: a9627bc5e34e79ae80a33241b8a1501cc498e191
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
[guptap@codeaurora.org: resolve trivial merge conflicts]
Signed-off-by: Prakash Gupta <guptap@codeaurora.org>
Diffstat (limited to 'mm/page_owner.c')
| -rw-r--r-- | mm/page_owner.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/mm/page_owner.c b/mm/page_owner.c index ce6f5dd6bfc0..a8ddaa7600ae 100644 --- a/mm/page_owner.c +++ b/mm/page_owner.c @@ -90,11 +90,14 @@ void __set_page_owner_migrate_reason(struct page *page, int reason) page_ext->last_migrate_reason = reason; } -gfp_t __get_page_owner_gfp(struct page *page) +void __split_page_owner(struct page *page, unsigned int order) { + int i; struct page_ext *page_ext = lookup_page_ext(page); - return page_ext->gfp_mask; + page_ext->order = 0; + for (i = 1; i < (1 << order); i++) + __copy_page_owner(page, page + i); } void __copy_page_owner(struct page *oldpage, struct page *newpage) |
