linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Roger Luethi <rl@hellgate.ch>
To: William Lee Irwin III <wli@holomorphy.com>,
	Albert Cahalan <albert@users.sf.net>,
	linux-kernel mailing list <linux-kernel@vger.kernel.org>,
	linux-mm@kvack.org
Subject: Re: [proc.txt] Fix /proc/pid/statm documentation
Date: Fri, 6 Aug 2004 15:57:56 +0200	[thread overview]
Message-ID: <20040806135756.GA21411@k3.hellgate.ch> (raw)
In-Reply-To: <20040806121118.GE17188@holomorphy.com>

On Fri, 06 Aug 2004 05:11:18 -0700, William Lee Irwin III wrote:
> Some of the 2.4 semantics just don't make sense. I would not find it
> difficult to explain what I believe correct semantics to be in a written
> document.

IMO this is a must for such files (and be it only some comments above
the code implementing them). I'm afraid that statm is carrying too much
historical baggage, though -- you would add yet another interpretation
of those 7 fields.

Tools reading statm would have to be updated anyway, so I'd rather
think about what could be done with a new (or just different) file.

For sysfs we have guidelines (e.g. sysfs.txt: "Attributes should be ASCII
text files, preferably with only one value per file. It is noted that it
may not be efficient to contain only value per file, so it is socially
acceptable to express an array of values of the same type.").

I'm not aware of anything comparable for proc, so it's hard to say
what a good solution would look like. Files like /proc/pid/status
are human-readable and maintenance-friendly (the parser can recognize
unknown values and gets a free label along with it; obsolete fields can
be removed). The downside is the performance aspect you pointed out:
Reading that file for every process just to grep for one or two values
is slow, and some of the unused data items might be expensive for the
kernel to produce in the first place.

It seems that most new information of interest is being added to
/proc/pid/status and friends these days. Are there any plans to
accomodate tool authors who are interested in additional information
but are wary of the increasing costs of these files?

A light-weight interface for tools could work like this (ugly):

$ cat /proc/pid.provided
Name SleepAVG Pid Tgid PPid VmSize VmLck VmData [...]
$ cat /proc/10235/VmSize.VmData
3380 144

Or use netlink maybe? It sure would be nice to monitor all processes
with lower overhead, and to have tools that can deal with new data
items without an update.

Roger
--
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>

  reply	other threads:[~2004-08-06 13:57 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1091754711.1231.2388.camel@cube>
     [not found] ` <20040806094037.GB11358@k3.hellgate.ch>
     [not found]   ` <20040806104630.GA17188@holomorphy.com>
2004-08-06 12:01     ` Roger Luethi
2004-08-06 12:11       ` William Lee Irwin III
2004-08-06 13:57         ` Roger Luethi [this message]
2004-08-06 14:07           ` William Lee Irwin III
2004-08-06 15:02             ` Roger Luethi
2004-08-06 14:02       ` Albert Cahalan
2004-08-06 16:48         ` William Lee Irwin III
2004-08-06 17:08         ` Roger Luethi
2004-08-06 15:14           ` Albert Cahalan
2004-08-06 20:49             ` Martin J. Bligh
2004-08-06 18:38               ` Albert Cahalan
2004-08-06 21:15                 ` Martin J. Bligh
2004-08-07 17:37         ` Paul Jackson
2004-08-06 12:58   ` Albert Cahalan
2004-08-06 15:48     ` William Lee Irwin III
2004-08-06 14:14       ` Albert Cahalan
2004-08-06 16:49         ` William Lee Irwin III
2004-08-06 16:34     ` Roger Luethi
2004-08-06 14:51       ` Albert Cahalan
2004-08-06 17:28         ` Martin J. Bligh
2004-08-06 18:21         ` Roger Luethi

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=20040806135756.GA21411@k3.hellgate.ch \
    --to=rl@hellgate.ch \
    --cc=albert@users.sf.net \
    --cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox