diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2018-04-23 08:20:31 +1000 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2018-04-23 08:23:49 +1000 |
commit | a568a776e05fc0a730f3db52e48e8a82dc746012 (patch) | |
tree | ad7d908588de909bfd9fc263d1075ff62cbf154f | |
parent | 7e5fe5347aaee3657c26d53535808159ee675ea6 (diff) | |
download | linux-a568a776e05fc0a730f3db52e48e8a82dc746012.tar.gz linux-a568a776e05fc0a730f3db52e48e8a82dc746012.tar.xz |
mm/page_owner: align with pageblock_nr_pages
Currently, init_pages_in_zone() walks the zone in pageblock_nr_pages
steps. MAX_ORDER_NR_PAGES is possible to have holes when
CONFIG_HOLES_IN_ZONE is set. it is likely to be different between
MAX_ORDER_NR_PAGES and pageblock_nr_pages. if we skip the size of
MAX_ORDER_NR_PAGES, it will result in the second 2M memroy leak.
Meanwhile, the change will make the code consistent. because the entire
function is based on the pageblock_nr_pages steps.
Link: http://lkml.kernel.org/r/1512395284-13588-1-git-send-email-zhongjiang@huawei.com
Signed-off-by: zhong jiang <zhongjiang@huawei.com>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
-rw-r--r-- | mm/page_owner.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/page_owner.c b/mm/page_owner.c index 75d21a2259b3..9972331980c2 100644 --- a/mm/page_owner.c +++ b/mm/page_owner.c @@ -274,7 +274,7 @@ void pagetypeinfo_showmixedcount_print(struct seq_file *m, */ for (; pfn < end_pfn; ) { if (!pfn_valid(pfn)) { - pfn = ALIGN(pfn + 1, MAX_ORDER_NR_PAGES); + pfn = ALIGN(pfn + 1, pageblock_nr_pages); continue; } |