From: Mike Fedyk <mfedyk@matchmail.com>
To: edjard@ufam.edu.br
Cc: Rik van Riel <riel@redhat.com>, linux-kernel@vger.kernel.org
Subject: Re: More questions about 2.6 /proc/meminfo was: (Mem: and Swap: lines in /proc/meminfo)
Date: Mon, 15 Dec 2003 13:57:17 -0800 [thread overview]
Message-ID: <20031215215717.GD1769@matchmail.com> (raw)
In-Reply-To: <33772.200.212.156.130.1071517210.squirrel@webmail.ufam.edu.br>
On Mon, Dec 15, 2003 at 05:40:10PM -0200, edjard@ufam.edu.br wrote:
> Some days ago we sent this patch for 2.6.0-test11, which gives some useful
> information regarding these data you are requesting.
>
> We are now changing this patch to provide the data you require. No body
> answered so far if this is ok to be done by the kernel. We did not to
> try to implement it as a module yet.
>
OK, interesting. I have some questions below.
> buffer += sprintf(buffer,
> "VmSize:\t%8lu kB\n"
> "VmLck:\t%8lu kB\n"
> "VmRSS:\t%8lu kB\n"
> "VmData:\t%8lu kB\n"
> + "RssData:\t%8lu kB\n"
> "VmStk:\t%8lu kB\n"
> + "RssStk:\t%8lu kB\n"
> "VmExe:\t%8lu kB\n"
> - "VmLib:\t%8lu kB\n",
> + "RssExe:\t%8lu kB\n"
> + "VmLib:\t%8lu kB\n"
> + "RssLib:\t%8lu kB\n"
> + "VmHeap:\t%8lu KB\n"
> + "RssHeap:\t%8lu KB\n",
> mm->total_vm << (PAGE_SHIFT-10),
> mm->locked_vm << (PAGE_SHIFT-10),
> mm->rss << (PAGE_SHIFT-10),
> - data - stack, stack,
> - exec - lib, lib);
> + data - stack, (phys_data - phys_stack) >> 10,
> + stack, phys_stack >> 10,
> + exec - lib, (phys_exec - phys_lib) >> 10,
> + lib, phys_lib >> 10,
> + (mm->brk - mm->start_brk) >> 10, phys_brk >> 10);
> up_read(&mm->mmap_sem);
> return buffer;
> }
Kernels without this patch, I'd have to take VmRSS and calculate that
against VmLib, and then have to think about shared memory between threads
and I'm not sure what else.
If I want to get the memory used by all apps from /proc/$pid/status, how am
I going to calculate it with this patch, and how will it be more accurate
from what I'd have to deal with from 2.[246] as they currently are without
the patch?
Thanks,
Mike
next prev parent reply other threads:[~2003-12-15 21:57 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-12-09 0:00 Mem: and Swap: lines in /proc/meminfo Mike Fedyk
2003-12-11 22:02 ` Rik van Riel
2003-12-11 22:23 ` Mike Fedyk
2003-12-11 22:42 ` Rik van Riel
2003-12-11 23:05 ` Mike Fedyk
2003-12-12 0:41 ` shm Rob Roschewsk
2003-12-12 0:43 ` shm Rob Roschewsk
2003-12-12 0:44 ` shm Rob Roschewsk
2003-12-12 0:45 ` shm Rob Roschewsk
2003-12-12 12:00 ` Mem: and Swap: lines in /proc/meminfo Rik van Riel
2003-12-12 18:12 ` Mike Fedyk
2003-12-13 3:23 ` More questions about 2.6 /proc/meminfo was: (Mem: and Swap: lines in /proc/meminfo) Mike Fedyk
2003-12-13 17:54 ` Rik van Riel
2003-12-14 1:44 ` Mike Fedyk
2003-12-15 0:17 ` Rik van Riel
2003-12-15 18:57 ` Mike Fedyk
2003-12-15 19:40 ` edjard
2003-12-15 21:57 ` Mike Fedyk [this message]
2003-12-16 4:10 ` Calculating total slab memory on 2.2/2.0 (was: More questions about 2.6 /proc/meminfo was: (Mem: and Swap: lines in /proc/meminfo)) Mike Fedyk
2003-12-16 20:07 ` Re: Re: More questions about 2.6 /proc/meminfo was: (Mem: and Swap: lines in /proc/meminfo) edjard
2003-12-17 1:12 ` [PATCH 2.4 Rmap] Add Inactive to /proc/meminfo was: Mem: and Swap: lines in /proc/meminfo Mike Fedyk
2003-12-17 3:59 ` Rik van Riel
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=20031215215717.GD1769@matchmail.com \
--to=mfedyk@matchmail.com \
--cc=edjard@ufam.edu.br \
--cc=linux-kernel@vger.kernel.org \
--cc=riel@redhat.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