linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
To: linux-mm <linux-mm@kvack.org>, LKML <linux-kernel@vger.kernel.org>
Cc: kosaki.motohiro@jp.fujitsu.com, Mel Gorman <mel@csn.ul.ie>,
	Wu Fengguang <fengguang.wu@intel.com>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: [PATCH for mmotm 4/5] adjust fields length of /proc/meminfo
Date: Thu, 11 Jun 2009 19:27:58 +0900 (JST)	[thread overview]
Message-ID: <20090611192717.6D56.A69D9226@jp.fujitsu.com> (raw)
In-Reply-To: <20090611192114.6D4A.A69D9226@jp.fujitsu.com>

Subject: [PATCH] adjust fields length of /proc/meminfo

This patch adjust fields of /proc/meminfo. it doesn't have any behavior
change.


<before>
$ cat /proc/meminfo
MemTotal:       32275164 kB
MemFree:        31880212 kB
Buffers:            8824 kB
Cached:           175304 kB
SwapCached:            0 kB
Active:            97236 kB
Inactive:         161336 kB
Active(anon):      75344 kB
Inactive(anon):        0 kB
Active(file):      21892 kB
Inactive(file):   161336 kB
Unevictable:           0 kB
Mlocked:               0 kB
SwapTotal:       4192956 kB
SwapFree:        4192956 kB
Dirty:                 0 kB
Writeback:             0 kB
AnonPages:         74480 kB
Mapped:            28048 kB
Mapped(SwapBacked):      836 kB
Slab:              45904 kB
SReclaimable:      23460 kB
SUnreclaim:        22444 kB
PageTables:         8484 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:    20330536 kB
Committed_AS:     162652 kB
VmallocTotal:   34359738367 kB
VmallocUsed:       85348 kB
VmallocChunk:   34359638395 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
DirectMap4k:        7680 kB
DirectMap2M:    33546240 kB


<after>
$ cat /proc/meminfo
MemTotal:           32275164 kB
MemFree:            32000220 kB
Buffers:                8132 kB
Cached:                81224 kB
SwapCached:                0 kB
Active:                70840 kB
Inactive:              72244 kB
Active(anon):          54492 kB
Inactive(anon):            0 kB
Active(file):          16348 kB
Inactive(file):        72244 kB
Unevictable:               0 kB
Mlocked:                   0 kB
SwapTotal:           4192956 kB
SwapFree:            4192956 kB
Dirty:                    60 kB
Writeback:                 0 kB
AnonPages:             53764 kB
Mapped:                27672 kB
Mapped(SwapBacked):      708 kB
Slab:                  41544 kB
SReclaimable:          18648 kB
SUnreclaim:            22896 kB
PageTables:             8440 kB
NFS_Unstable:              0 kB
Bounce:                    0 kB
WritebackTmp:              0 kB
CommitLimit:        20330536 kB
Committed_AS:         141696 kB
VmallocTotal:    34359738367 kB
VmallocUsed:           85348 kB
VmallocChunk:    34359638395 kB
HugePages_Total:           0
HugePages_Free:            0
HugePages_Rsvd:            0
HugePages_Surp:            0
Hugepagesize:           2048 kB
DirectMap4k:            7680 kB
DirectMap2M:        33546240 kB


Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
---
 arch/x86/mm/pageattr.c |    8 ++---
 fs/proc/meminfo.c      |   74 ++++++++++++++++++++++++-------------------------
 mm/hugetlb.c           |   10 +++---
 3 files changed, 46 insertions(+), 46 deletions(-)

Index: b/arch/x86/mm/pageattr.c
===================================================================
--- a/arch/x86/mm/pageattr.c
+++ b/arch/x86/mm/pageattr.c
@@ -70,18 +70,18 @@ static void split_page_count(int level)
 
 void arch_report_meminfo(struct seq_file *m)
 {
-	seq_printf(m, "DirectMap4k:    %8lu kB\n",
+	seq_printf(m, "DirectMap4k:        %8lu kB\n",
 			direct_pages_count[PG_LEVEL_4K] << 2);
 #if defined(CONFIG_X86_64) || defined(CONFIG_X86_PAE)
-	seq_printf(m, "DirectMap2M:    %8lu kB\n",
+	seq_printf(m, "DirectMap2M:        %8lu kB\n",
 			direct_pages_count[PG_LEVEL_2M] << 11);
 #else
-	seq_printf(m, "DirectMap4M:    %8lu kB\n",
+	seq_printf(m, "DirectMap4M:        %8lu kB\n",
 			direct_pages_count[PG_LEVEL_2M] << 12);
 #endif
 #ifdef CONFIG_X86_64
 	if (direct_gbpages)
-		seq_printf(m, "DirectMap1G:    %8lu kB\n",
+		seq_printf(m, "DirectMap1G:        %8lu kB\n",
 			direct_pages_count[PG_LEVEL_1G] << 20);
 #endif
 }
Index: b/fs/proc/meminfo.c
===================================================================
--- a/fs/proc/meminfo.c
+++ b/fs/proc/meminfo.c
@@ -53,50 +53,50 @@ static int meminfo_proc_show(struct seq_
 	 * Tagged format, for easy grepping and expansion.
 	 */
 	seq_printf(m,
-		"MemTotal:       %8lu kB\n"
-		"MemFree:        %8lu kB\n"
-		"Buffers:        %8lu kB\n"
-		"Cached:         %8lu kB\n"
-		"SwapCached:     %8lu kB\n"
-		"Active:         %8lu kB\n"
-		"Inactive:       %8lu kB\n"
-		"Active(anon):   %8lu kB\n"
-		"Inactive(anon): %8lu kB\n"
-		"Active(file):   %8lu kB\n"
-		"Inactive(file): %8lu kB\n"
-		"Unevictable:    %8lu kB\n"
-		"Mlocked:        %8lu kB\n"
+		"MemTotal:           %8lu kB\n"
+		"MemFree:            %8lu kB\n"
+		"Buffers:            %8lu kB\n"
+		"Cached:             %8lu kB\n"
+		"SwapCached:         %8lu kB\n"
+		"Active:             %8lu kB\n"
+		"Inactive:           %8lu kB\n"
+		"Active(anon):       %8lu kB\n"
+		"Inactive(anon):     %8lu kB\n"
+		"Active(file):       %8lu kB\n"
+		"Inactive(file):     %8lu kB\n"
+		"Unevictable:        %8lu kB\n"
+		"Mlocked:            %8lu kB\n"
 #ifdef CONFIG_HIGHMEM
-		"HighTotal:      %8lu kB\n"
-		"HighFree:       %8lu kB\n"
-		"LowTotal:       %8lu kB\n"
-		"LowFree:        %8lu kB\n"
+		"HighTotal:          %8lu kB\n"
+		"HighFree:           %8lu kB\n"
+		"LowTotal:           %8lu kB\n"
+		"LowFree:            %8lu kB\n"
 #endif
 #ifndef CONFIG_MMU
-		"MmapCopy:       %8lu kB\n"
+		"MmapCopy:           %8lu kB\n"
 #endif
-		"SwapTotal:      %8lu kB\n"
-		"SwapFree:       %8lu kB\n"
-		"Dirty:          %8lu kB\n"
-		"Writeback:      %8lu kB\n"
-		"AnonPages:      %8lu kB\n"
-		"Mapped:         %8lu kB\n"
+		"SwapTotal:          %8lu kB\n"
+		"SwapFree:           %8lu kB\n"
+		"Dirty:              %8lu kB\n"
+		"Writeback:          %8lu kB\n"
+		"AnonPages:          %8lu kB\n"
+		"Mapped:             %8lu kB\n"
 		"Mapped(SwapBacked): %8lu kB\n"
-		"Slab:           %8lu kB\n"
-		"SReclaimable:   %8lu kB\n"
-		"SUnreclaim:     %8lu kB\n"
-		"PageTables:     %8lu kB\n"
+		"Slab:               %8lu kB\n"
+		"SReclaimable:       %8lu kB\n"
+		"SUnreclaim:         %8lu kB\n"
+		"PageTables:         %8lu kB\n"
 #ifdef CONFIG_QUICKLIST
-		"Quicklists:     %8lu kB\n"
+		"Quicklists:         %8lu kB\n"
 #endif
-		"NFS_Unstable:   %8lu kB\n"
-		"Bounce:         %8lu kB\n"
-		"WritebackTmp:   %8lu kB\n"
-		"CommitLimit:    %8lu kB\n"
-		"Committed_AS:   %8lu kB\n"
-		"VmallocTotal:   %8lu kB\n"
-		"VmallocUsed:    %8lu kB\n"
-		"VmallocChunk:   %8lu kB\n",
+		"NFS_Unstable:       %8lu kB\n"
+		"Bounce:             %8lu kB\n"
+		"WritebackTmp:       %8lu kB\n"
+		"CommitLimit:    %12lu kB\n"
+		"Committed_AS:   %12lu kB\n"
+		"VmallocTotal:   %12lu kB\n"
+		"VmallocUsed:    %12lu kB\n"
+		"VmallocChunk:   %12lu kB\n",
 		K(i.totalram),
 		K(i.freeram),
 		K(i.bufferram),
Index: b/mm/hugetlb.c
===================================================================
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -1565,11 +1565,11 @@ void hugetlb_report_meminfo(struct seq_f
 {
 	struct hstate *h = &default_hstate;
 	seq_printf(m,
-			"HugePages_Total:   %5lu\n"
-			"HugePages_Free:    %5lu\n"
-			"HugePages_Rsvd:    %5lu\n"
-			"HugePages_Surp:    %5lu\n"
-			"Hugepagesize:   %8lu kB\n",
+			"HugePages_Total:    %8lu\n"
+			"HugePages_Free:     %8lu\n"
+			"HugePages_Rsvd:     %8lu\n"
+			"HugePages_Surp:     %8lu\n"
+			"Hugepagesize:       %8lu kB\n",
 			h->nr_huge_pages,
 			h->free_huge_pages,
 			h->resv_huge_pages,


--
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>

  parent reply	other threads:[~2009-06-11 10:27 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-11 10:25 [PATCH for mmotm 0/5] introduce swap-backed-file-mapped count and fix vmscan-change-the-number-of-the-unmapped-files-in-zone-reclaim.patch KOSAKI Motohiro
2009-06-11 10:26 ` [PATCH for mmotm 1/5] cleanp page_remove_rmap() KOSAKI Motohiro
2009-06-11 11:01   ` Mel Gorman
2009-06-11 23:21   ` Wu Fengguang
2009-06-11 10:26 ` [PATCH for mmotm 2/5] KOSAKI Motohiro
2009-06-11 11:13   ` Mel Gorman
2009-06-11 11:50     ` KOSAKI Motohiro
2009-06-12 10:22       ` Mel Gorman
2009-06-11 23:29   ` Wu Fengguang
2009-06-11 10:27 ` [PATCH for mmotm 3/5] add Mapped(SwapBacked) field to /proc/meminfo KOSAKI Motohiro
2009-06-11 10:27 ` KOSAKI Motohiro [this message]
2009-06-11 10:28 ` [PATCH for mmotm 5/5] fix vmscan-change-the-number-of-the-unmapped-files-in-zone-reclaim.patch KOSAKI Motohiro
2009-06-11 11:15   ` Mel Gorman
2009-06-11 10:38 ` [PATCH for mmotm 0/5] introduce swap-backed-file-mapped count and " Mel Gorman
2009-06-11 10:42   ` KOSAKI Motohiro
2009-06-11 10:53     ` Mel Gorman
2009-06-11 11:32       ` 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=20090611192717.6D56.A69D9226@jp.fujitsu.com \
    --to=kosaki.motohiro@jp.fujitsu.com \
    --cc=akpm@linux-foundation.org \
    --cc=fengguang.wu@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mel@csn.ul.ie \
    /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