linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: kosaki.motohiro@gmail.com
To: linux-kernel@vger.kernel.org
Cc: linux-mm@kvack.org,
	KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
	Christoph Lameter <cl@linux.com>
Subject: [PATCH] mm: fix protection column misplacing in /proc/zoneinfo
Date: Mon, 11 Jun 2012 09:50:50 -0400	[thread overview]
Message-ID: <1339422650-9798-1-git-send-email-kosaki.motohiro@gmail.com> (raw)

From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>

commit 2244b95a7b (zoned vm counters: basic ZVC (zoned vm counter)
implementation) broke protection column. It is a part of "pages"
attribute. but not it is showed after vmstats column.

This patch restores the right position.

<before>
  pages free     3965
        min      32
        low      40
        high     48
        scanned  0
        spanned  4080
        present  3909
    (snip)
    numa_local   1
    numa_other   0
    nr_anon_transparent_hugepages 0
        protection: (0, 3512, 7867, 7867)

<after>
  pages free     3965
        min      32
        low      40
        high     48
        scanned  0
        spanned  4080
        present  3909
        protection: (0, 3504, 7851, 7851)
    nr_free_pages 3965
    nr_inactive_anon 0

Cc: Christoph Lameter <cl@linux.com>
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
---
 mm/vmstat.c |   15 +++++++--------
 1 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/mm/vmstat.c b/mm/vmstat.c
index 1bbbbd9..9f5f2a9 100644
--- a/mm/vmstat.c
+++ b/mm/vmstat.c
@@ -987,19 +987,18 @@ static void zoneinfo_show_print(struct seq_file *m, pg_data_t *pgdat,
 		   zone->pages_scanned,
 		   zone->spanned_pages,
 		   zone->present_pages);
-
-	for (i = 0; i < NR_VM_ZONE_STAT_ITEMS; i++)
-		seq_printf(m, "\n    %-12s %lu", vmstat_text[i],
-				zone_page_state(zone, i));
-
 	seq_printf(m,
 		   "\n        protection: (%lu",
 		   zone->lowmem_reserve[0]);
 	for (i = 1; i < ARRAY_SIZE(zone->lowmem_reserve); i++)
 		seq_printf(m, ", %lu", zone->lowmem_reserve[i]);
-	seq_printf(m,
-		   ")"
-		   "\n  pagesets");
+	seq_printf(m, ")");
+
+	for (i = 0; i < NR_VM_ZONE_STAT_ITEMS; i++)
+		seq_printf(m, "\n    %-12s %lu", vmstat_text[i],
+				zone_page_state(zone, i));
+
+	seq_printf(m, "\n  pagesets");
 	for_each_online_cpu(i) {
 		struct per_cpu_pageset *pageset;
 
-- 
1.7.1

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

             reply	other threads:[~2012-06-11 13:50 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-11 13:50 kosaki.motohiro [this message]
2012-06-11 14:02 ` Christoph Lameter
2012-06-11 14:31   ` KOSAKI Motohiro
2012-06-11 14:40     ` Christoph Lameter
2012-06-11 14:58       ` KOSAKI Motohiro
2012-06-11 20:37     ` David Rientjes
2012-06-11 20:48       ` KOSAKI Motohiro
2012-06-11 20:52         ` David Rientjes
2012-06-11 21:04         ` Christoph Lameter
2012-06-11 21:19           ` KOSAKI Motohiro

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=1339422650-9798-1-git-send-email-kosaki.motohiro@gmail.com \
    --to=kosaki.motohiro@gmail.com \
    --cc=cl@linux.com \
    --cc=kosaki.motohiro@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    /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