Skip to content

Commit

Permalink
mm/page_owner: copy last_migrate_reason in copy_page_owner()
Browse files Browse the repository at this point in the history
Currently, copy_page_owner() doesn't copy all the owner information.  It
skips last_migrate_reason because copy_page_owner() is used for
migration and it will be properly set soon.  But, following patch will
use copy_page_owner() and this skip will cause the problem that
allocated page has uninitialied last_migrate_reason.  To prevent it,
this patch also copy last_migrate_reason in copy_page_owner().

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Joonsoo Kim <[email protected]>
Acked-by: Vlastimil Babka <[email protected]>
Cc: Mel Gorman <[email protected]>
Cc: Minchan Kim <[email protected]>
Cc: Alexander Potapenko <[email protected]>
Cc: Hugh Dickins <[email protected]>
Cc: Michal Hocko <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
JoonsooKim authored and torvalds committed Jul 26, 2016
1 parent 83358ec commit a8efe1c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions mm/page_owner.c
Original file line number Diff line number Diff line change
@@ -118,6 +118,7 @@ void __copy_page_owner(struct page *oldpage, struct page *newpage)

new_ext->order = old_ext->order;
new_ext->gfp_mask = old_ext->gfp_mask;
new_ext->last_migrate_reason = old_ext->last_migrate_reason;
new_ext->nr_entries = old_ext->nr_entries;

for (i = 0; i < ARRAY_SIZE(new_ext->trace_entries); i++)

0 comments on commit a8efe1c

Please sign in to comment.