mm/vmstat.c: walk the zone in pageblock_nr_pages steps
authorzhong jiang <zhongjiang@huawei.com>
Sat, 10 Sep 2016 10:34:16 +0000 (20:34 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Sat, 10 Sep 2016 10:34:16 +0000 (20:34 +1000)
when walking the zone, we can happens to the holes. we should not
align MAX_ORDER_NR_PAGES, so it can skip the normal memory.

In addition, pagetypeinfo_showmixedcount_print reflect fragmentization.
we hope to get more accurate data. therefore, I decide to fix it.

Link: http://lkml.kernel.org/r/1469502526-24486-2-git-send-email-zhongjiang@huawei.com
Signed-off-by: zhong jiang <zhongjiang@huawei.com>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/page_owner.c

index 754efdd52bf74f511db1ec0d702f6db007a7ea29..c3cee247f2e609f1fb1f3e799a35dad40e4932c8 100644 (file)
@@ -261,7 +261,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;
                }
 
This page took 0.025946 seconds and 5 git commands to generate.