linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
To: LKML <linux-kernel@vger.kernel.org>,
	linux-mm <linux-mm@kvack.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Christoph Lameter <cl@linux-foundation.org>,
	tokunaga.keiich@jp.fujitsu.com
Cc: kosaki.motohiro@jp.fujitsu.com
Subject: [RFC][PATCH 1/2] Show quicklist at meminfo
Date: Wed, 20 Aug 2008 20:07:06 +0900	[thread overview]
Message-ID: <20080820200607.12ED.KOSAKI.MOTOHIRO@jp.fujitsu.com> (raw)
In-Reply-To: <20080820195021.12E7.KOSAKI.MOTOHIRO@jp.fujitsu.com>

Now, Quicklist can spent several GB memory.
So, if end user can't hou much spent memory, he misunderstand to memory leak happend.


after this patch applied, /proc/meminfo output following.

% cat /proc/meminfo

MemTotal:        7701504 kB
MemFree:         5159040 kB
Buffers:          112960 kB
Cached:           337536 kB
SwapCached:            0 kB
Active:           218944 kB
Inactive:         350848 kB
Active(anon):     120832 kB
Inactive(anon):        0 kB
Active(file):      98112 kB
Inactive(file):   350848 kB
Unevictable:           0 kB
Mlocked:               0 kB
SwapTotal:       2031488 kB
SwapFree:        2031488 kB
Dirty:               320 kB
Writeback:             0 kB
AnonPages:        119488 kB
Mapped:            38528 kB
Slab:            1595712 kB
SReclaimable:      23744 kB
SUnreclaim:      1571968 kB
PageTables:        14336 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:     5882240 kB
Committed_AS:     356672 kB
VmallocTotal:   17592177655808 kB
VmallocUsed:       29056 kB
VmallocChunk:   17592177626304 kB
Quicklists:       283776 kB
HugePages_Total:     0
HugePages_Free:      0
HugePages_Rsvd:      0
HugePages_Surp:      0
Hugepagesize:    262144 kB


Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>

---
 fs/proc/proc_misc.c       |    6 ++++--
 include/linux/quicklist.h |    7 +++++++
 2 files changed, 11 insertions(+), 2 deletions(-)

Index: b/fs/proc/proc_misc.c
===================================================================
--- a/fs/proc/proc_misc.c
+++ b/fs/proc/proc_misc.c
@@ -202,7 +202,8 @@ static int meminfo_read_proc(char *page,
 		"Committed_AS:   %8lu kB\n"
 		"VmallocTotal:   %8lu kB\n"
 		"VmallocUsed:    %8lu kB\n"
-		"VmallocChunk:   %8lu kB\n",
+		"VmallocChunk:   %8lu kB\n"
+		"Quicklists:     %8lu kB\n",
 		K(i.totalram),
 		K(i.freeram),
 		K(i.bufferram),
@@ -242,7 +243,8 @@ static int meminfo_read_proc(char *page,
 		K(committed),
 		(unsigned long)VMALLOC_TOTAL >> 10,
 		vmi.used >> 10,
-		vmi.largest_chunk >> 10
+		vmi.largest_chunk >> 10,
+		K(quicklist_total_size())
 		);
 
 		len += hugetlb_report_meminfo(page + len);
Index: b/include/linux/quicklist.h
===================================================================
--- a/include/linux/quicklist.h
+++ b/include/linux/quicklist.h
@@ -80,6 +80,13 @@ void quicklist_trim(int nr, void (*dtor)
 
 unsigned long quicklist_total_size(void);
 
+#else
+
+static inline unsigned long quicklist_total_size(void)
+{
+	return 0;
+}
+
 #endif
 
 #endif /* LINUX_QUICKLIST_H */


--
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:[~2008-08-20 11:07 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-20 11:05 [RFC][PATCH 0/2] Quicklist is slighly problematic KOSAKI Motohiro
2008-08-20 11:07 ` KOSAKI Motohiro [this message]
2008-08-20 18:35   ` [RFC][PATCH 1/2] Show quicklist at meminfo Andrew Morton
2008-08-21  7:36     ` KOSAKI Motohiro
2008-08-22  1:05       ` KOSAKI Motohiro
2008-08-22  4:28         ` Andrew Morton
2008-08-22 13:23           ` Robin Holt
2008-08-22 13:56             ` Christoph Lameter
2008-08-23  8:24           ` KOSAKI Motohiro
2008-08-24  5:29             ` Andrew Morton
2008-08-20 11:08 ` [RFC][PATCH 2/2] quicklist shouldn't be proportional to # of CPUs KOSAKI Motohiro
2008-08-20 15:27   ` Christoph Lameter
2008-08-21  6:46   ` Andrew Morton
2008-08-21  7:13     ` David Miller, Andrew Morton
2008-08-21  7:18       ` KOSAKI Motohiro
2008-08-21  7:27       ` Andrew Morton
2008-08-21  7:31         ` KOSAKI Motohiro
2008-08-21  9:32         ` Peter Zijlstra
2008-08-21 10:04           ` KOSAKI Motohiro
2008-08-21 10:09             ` David Miller, KOSAKI Motohiro
2008-08-21 10:13               ` KOSAKI Motohiro
2008-08-21 10:26                 ` David Miller, KOSAKI Motohiro
2008-08-21 10:22             ` KOSAKI Motohiro
2008-08-21 12:02               ` KOSAKI Motohiro
2008-08-25 18:48             ` Mike Travis
2008-08-25 23:33               ` KOSAKI Motohiro
2008-08-26 20:35                 ` Mike Travis
2008-08-25 18:44           ` Mike Travis
2008-08-25 18:40       ` Mike Travis
2008-08-25 23:31         ` KOSAKI Motohiro
2008-08-20 14:10 ` [RFC][PATCH 0/2] Quicklist is slighly problematic Christoph Lameter
2008-08-20 14:49   ` KOSAKI Motohiro
2008-08-20 15:26     ` Christoph Lameter
2008-08-21  2:13   ` Robin Holt
2008-08-21  2:16     ` Robin Holt
2008-08-21  3:08     ` David Miller, Robin Holt
2008-08-21 13:10       ` Christoph Lameter
2008-08-20 18:31 ` Andrew Morton
2008-08-21  2:42   ` Robin Holt
2008-08-21 13:07     ` Christoph Lameter
2008-08-21 13:14       ` Robin Holt
2008-08-21 13:18         ` Christoph Lameter
2008-08-21 13:45           ` Robin Holt

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=20080820200607.12ED.KOSAKI.MOTOHIRO@jp.fujitsu.com \
    --to=kosaki.motohiro@jp.fujitsu.com \
    --cc=akpm@linux-foundation.org \
    --cc=cl@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=tokunaga.keiich@jp.fujitsu.com \
    /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