From: Keith Owens <kaos@ocs.com.au>
To: "Martin J. Bligh" <Martin.Bligh@us.ibm.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [RFC] patch to /proc/meminfo to display NUMA stats
Date: Tue, 23 Apr 2002 09:39:31 +1000 [thread overview]
Message-ID: <6087.1019518771@ocs3.intra.ocs.com.au> (raw)
In-Reply-To: Your message of "Mon, 22 Apr 2002 10:05:19 MST." <25270000.1019495119@flay>
On Mon, 22 Apr 2002 10:05:19 -0700,
"Martin J. Bligh" <Martin.Bligh@us.ibm.com> wrote:
>Below is a patch to /proc/meminfo to display free, used and total
>memory per node on a NUMA machine. It works fine on an ia32
>machine, but is not yet ready for submission until I make it generic.
>Before I go to the effort of doing that, I thought I'd seek some feedback.
>
>diff -urN virgin-2.4.18/fs/proc/proc_misc.c linux-2.4.18-meminfo/fs/proc/proc_misc.c
>--- virgin-2.4.18/fs/proc/proc_misc.c Tue Nov 20 21:29:09 2001
>+++ linux-2.4.18-meminfo/fs/proc/proc_misc.c Mon Apr 15 09:31:32 2002
>+#ifdef CONFIG_NUMA
>+ for (nid = 0; nid < numnodes; ++nid) {
>+ si_meminfo_node(&i, nid);
>+ len += sprintf(page+len, "\n"
>+ "Node %d MemTotal: %8lu kB\n"
>+ "Node %d MemFree: %8lu kB\n"
>+ "Node %d MemUsed: %8lu kB\n"
>+ "Node %d HighTotal: %8lu kB\n"
>+ "Node %d HighFree: %8lu kB\n"
>+ "Node %d LowTotal: %8lu kB\n"
>+ "Node %d LowFree: %8lu kB\n",
>+ nid, K(i.totalram),
>+ nid, K(i.freeram),
>+ nid, K(i.totalram-i.freeram),
>+ nid, K(i.totalhigh),
>+ nid, K(i.freehigh),
>+ nid, K(i.totalram-i.totalhigh),
>+ nid, K(i.freeram-i.freehigh));
>+ }
>+#endif
meminfo_read_proc() assumes that all its output will fit in one page.
Currently it does, ~520 bytes. You are adding ~120 bytes per node so
it will break at ~29 nodes using 4K pages. To make that scalable,
meminfo_read_proc() must be converted to seq_file format.
next prev parent reply other threads:[~2002-04-22 23:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-04-22 17:05 Martin J. Bligh
2002-04-22 16:39 ` Christoph Hellwig
2002-04-24 19:39 ` Martin J. Bligh
2002-04-24 19:47 ` Martin J. Bligh
2002-04-22 23:39 ` Keith Owens [this message]
2002-04-22 23:49 ` Jesse Barnes
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=6087.1019518771@ocs3.intra.ocs.com.au \
--to=kaos@ocs.com.au \
--cc=Martin.Bligh@us.ibm.com \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®