linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Bruce ZHANG <bo.zhang@nxp.com>
To: "akpm@linux-foundation.org" <akpm@linux-foundation.org>
Cc: "guro@fb.com" <guro@fb.com>, "mhocko@suse.com" <mhocko@suse.com>,
	"vbabka@suse.cz" <vbabka@suse.cz>,
	"jannh@google.com" <jannh@google.com>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>
Subject: [PATCH] mm,vmstat: correct pagetypeinfo statistics when show
Date: Fri, 10 May 2019 12:36:48 +0000	[thread overview]
Message-ID: <1557491480-19857-1-git-send-email-bo.zhang@nxp.com> (raw)

The "Free pages count per migrate type at order" are shown with the
order from 0 ~ (MAX_ORDER-1), while "Page block order" just print
pageblock_order. If the macro CONFIG_HUGETLB_PAGE is defined, the
pageblock_order may not be equal to (MAX_ORDER-1).

Signed-off-by: Zhang Bo <bo.zhang@nxp.com>
---
 mm/vmstat.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mm/vmstat.c b/mm/vmstat.c
index 6389e87..b0089cf 100644
--- a/mm/vmstat.c
+++ b/mm/vmstat.c
@@ -1430,8 +1430,8 @@ static int pagetypeinfo_show(struct seq_file *m, void *arg)
 	if (!node_state(pgdat->node_id, N_MEMORY))
 		return 0;
 
-	seq_printf(m, "Page block order: %d\n", pageblock_order);
-	seq_printf(m, "Pages per block:  %lu\n", pageblock_nr_pages);
+	seq_printf(m, "Page block order: %d\n", MAX_ORDER - 1);
+	seq_printf(m, "Pages per block:  %lu\n", MAX_ORDER_NR_PAGES);
 	seq_putc(m, '\n');
 	pagetypeinfo_showfree(m, pgdat);
 	pagetypeinfo_showblockcount(m, pgdat);
-- 
1.9.1


             reply	other threads:[~2019-05-10 12:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-10 12:36 Bruce ZHANG [this message]
2019-05-10 18:49 ` [PATCH] mm,vmstat: correct pagetypeinfo statistics when show Daniel Jordan
2019-05-13  8:53   ` Mel Gorman
2019-05-17  6:44     ` Anshuman Khandual
2019-05-10 20:13 ` Daniel Jordan
2019-05-10 21:24 ` Daniel Jordan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1557491480-19857-1-git-send-email-bo.zhang@nxp.com \
    --to=bo.zhang@nxp.com \
    --cc=akpm@linux-foundation.org \
    --cc=guro@fb.com \
    --cc=jannh@google.com \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.com \
    --cc=vbabka@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).