From: Roger Luethi <rl@hellgate.ch>
To: William Lee Irwin III <wli@holomorphy.com>, linux-mm@kvack.org
Cc: Andrew Morton <akpm@osdl.org>
Subject: [PATCH] Deprecate /proc/#/statm
Date: Tue, 12 Aug 2003 12:40:46 +0200 [thread overview]
Message-ID: <20030812104046.GA6606@k3.hellgate.ch> (raw)
In-Reply-To: <20030811221646.GF3170@holomorphy.com>
On Mon, 11 Aug 2003 15:16:46 -0700, William Lee Irwin III wrote:
> > has actually more values that seem correct as it is now. Since statm has
> > been broken in 2.4, fixing it for 2.6 means basically _introducing_ a file
> > full of redundant information with unclear semantics, a file which nobody
> > missed in 2.4. I still think the file should die.
>
> Not entirely unreasonable.
Alright. We have established that /proc/#/statm has been useless at least
since 2.4. Procps doesn't even bother reading it.
I propose this very non-invasive patch for 2.6. It replaces all values
printed in statm (all of which are either redundant or bogus) with 0s (for
kblockd and others statm is a line of zeroes already). IMO the real surgery
should happen in 2.7.
Comments? Andrew?
Roger
--- fs/proc/array.c.orig 2003-08-12 11:21:54.599717655 +0200
+++ fs/proc/array.c 2003-08-12 12:09:28.912397328 +0200
@@ -392,6 +392,8 @@
int proc_pid_statm(struct task_struct *task, char *buffer)
{
int size = 0, resident = 0, shared = 0, text = 0, lib = 0, data = 0;
+ /* TODO Rip out /proc/#/statm in 2.7 */
+#if 0
struct mm_struct *mm = get_task_mm(task);
if (mm) {
@@ -401,6 +403,7 @@
mmput(mm);
}
+#endif
return sprintf(buffer,"%d %d %d %d %d %d %d\n",
size, resident, shared, text, lib, data, 0);
--
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:"aart@kvack.org"> aart@kvack.org </a>
next prev parent reply other threads:[~2003-08-12 10:40 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-08-11 9:02 Is /proc/#/statm worth fixing? Roger Luethi
2003-08-11 16:02 ` William Lee Irwin III
2003-08-11 21:52 ` Roger Luethi
2003-08-11 22:16 ` William Lee Irwin III
2003-08-12 10:40 ` Roger Luethi [this message]
2003-08-13 0:36 ` [PATCH] Deprecate /proc/#/statm William Lee Irwin III
2003-08-13 7:58 ` Roger Luethi
2003-08-14 6:40 ` William Lee Irwin III
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=20030812104046.GA6606@k3.hellgate.ch \
--to=rl@hellgate.ch \
--cc=akpm@osdl.org \
--cc=linux-mm@kvack.org \
--cc=wli@holomorphy.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.