LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: kosaki.motohiro@jp.fujitsu.com,
	LKML <linux-kernel@vger.kernel.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Ingo Molnar <mingo@elte.hu>, Christoph Lameter <clameter@sgi.com>,
	Bart Van Assche <bart.vanassche@gmail.com>
Subject: Re: quicklists confuse meminfo
Date: Sun, 09 Mar 2008 19:42:56 +0900	[thread overview]
Message-ID: <20080309193657.C6D8.KOSAKI.MOTOHIRO@jp.fujitsu.com> (raw)
In-Reply-To: <alpine.LFD.1.00.0803090919481.3099@apollo.tec.linutronix.de>

Hi

in general, I like this patch and I think this is very useful.
but I don't like #ifdef ;)

> +#ifdef CONFIG_QUICKLIST
> +		"QuickLists:   %8lu kB\n"
> +#endif
> +		,K(i.totalram),
>  		K(i.freeram),
>  		K(i.bufferram),
>  		K(cached),
> @@ -215,6 +220,9 @@ static int meminfo_read_proc(char *page,
>  		(unsigned long)VMALLOC_TOTAL >> 10,
>  		vmi.used >> 10,
>  		vmi.largest_chunk >> 10
> +#ifdef CONFIG_QUICKLIST
> +		,K(quicklist_total_size())
> +#endif

Do you dislike my following patch?

- kosaki



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       2008-03-09 16:04:39.000000000 +0900
+++ b/fs/proc/proc_misc.c       2008-03-09 19:47:47.000000000 +0900
@@ -182,7 +182,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),
@@ -213,7 +214,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 2008-03-09 16:02:28.000000000 +0900
+++ b/include/linux/quicklist.h 2008-03-09 19:45:58.000000000 +0900
@@ -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 */



  parent reply	other threads:[~2008-03-09 10:43 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-09 10:19 Thomas Gleixner
2008-03-09 10:26 ` Bart Van Assche
2008-03-09 10:29 ` Andi Kleen
2008-03-09 10:42 ` KOSAKI Motohiro [this message]
2008-03-09 12:00   ` Thomas Gleixner
2008-03-09 11:14 ` Ingo Molnar
2008-03-09 11:56   ` Thomas Gleixner
2008-03-09 12:01     ` Ingo Molnar
2008-03-09 12:49       ` Andi Kleen
2008-03-10 15:51         ` Christoph Lameter
2008-03-09 12:03   ` Johannes Weiner
2008-03-09 12:03   ` KOSAKI Motohiro
2008-03-09 12:09     ` Ingo Molnar
2008-03-09 12:34       ` Ingo Molnar
2008-03-09 12:51         ` KOSAKI Motohiro
2008-03-09 13:20         ` Thomas Gleixner
2008-03-09 18:46         ` Andrew Morton
2008-03-09 20:21           ` Andi Kleen
2008-03-10 15:54           ` Christoph Lameter
2008-03-10 16:43             ` Andi Kleen
2008-03-10 17:19               ` Hugh Dickins
2008-03-10 17:25                 ` Andi Kleen
2008-03-10 17:31                 ` Jeremy Fitzhardinge
2008-03-10 17:53                   ` Andi Kleen
2008-03-10 18:35                     ` Jeremy Fitzhardinge
2008-03-10 19:06                       ` Andi Kleen
2008-03-10 20:54                       ` H. Peter Anvin
2008-03-10 21:26                         ` Jeremy Fitzhardinge
2008-03-11  4:07             ` Nick Piggin
2008-03-21 12:52               ` Bart Van Assche
2008-03-21 14:45                 ` Ingo Molnar
2008-03-26  7:45                   ` Bart Van Assche
2008-03-26  7:53                     ` Andrew Morton
2008-03-26  8:13                     ` Ingo Molnar
2008-03-26 10:37                       ` Bart Van Assche
2008-03-26 16:34                         ` Christoph Lameter
2008-03-27  9:48                           ` Bart Van Assche
2008-03-09 19:11         ` Arjan van de Ven
2008-03-09 19:25           ` Ingo Molnar
2008-03-09 19:27             ` Ingo Molnar
2008-03-09 19:31               ` Ingo Molnar
2008-03-10 15:57               ` Christoph Lameter
2008-03-10 15:55             ` Christoph Lameter
2008-03-09 12:47       ` 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=20080309193657.C6D8.KOSAKI.MOTOHIRO@jp.fujitsu.com \
    --to=kosaki.motohiro@jp.fujitsu.com \
    --cc=akpm@linux-foundation.org \
    --cc=bart.vanassche@gmail.com \
    --cc=clameter@sgi.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --subject='Re: quicklists confuse meminfo' \
    /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

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