From: Albert Cahalan <albert@users.sf.net>
To: linux-kernel mailing list <linux-kernel@vger.kernel.org>
Cc: rl@hellgate.ch
Subject: Re: nproc: So?
Date: 17 Sep 2004 12:55:32 -0400 [thread overview]
Message-ID: <1095440131.3874.4626.camel@cube> (raw)
Roger Luethi writes:
> I have received some constructive criticism and suggestions,
> but I didn't see any comments on the desirability of nproc in
> mainline. Initially meant to be a proof-of-concept, nproc has
> become an interface that is much cleaner and faster than procfs
> can ever hope to be (it takes some reading of procps or libgtop
> code to appreciate the complexity that is /proc file parsing today),
You spotted the perfect hash lookup? :-)
> and every change in /proc files widens the gap. I presented
> source code, benchmarks, and design documentation to substantiate
> my claims; I can post the user-space code somewhere if there's
> interest.
>
> So I'm wondering if everybody's waiting for me to answer some
> important question I overlooked, or if there is a general
> sentiment that this project is not worth pursuing.
I'm very glad to see numerical proof that /proc is crap.
If nproc does nothing else, it's still been useful.
The funny varargs/vsprintf/whatever encoding is useless to me,
as are the labels.
The nicest think about netlink is, i think, that it might make
a practical interface for incremental update. As processes run
or get modified, monitoring apps might get notified. I did not
see mention of this being implemented, and I would take quite
some time to support it, so it's a long-term goal. (of course,
people can always submit procps patches to support this)
I doubt that it is good to break down the data into so many
different items. It seems sensible to break down the data by
locking requirements.
I could use an opaque per-process cookie for process identification.
This would protect from PID reuse, and might allow for faster
lookup. Perhaps it contains: PID, address of task_struct, and the
system-wide or per-cpu fork count from process creation.
Something like the stat() syscall would be pretty decent.
Well, whatever... In any case, I'd need to see some working code
for the libproc library. My net connection dies for hours at a
time, so don't expect speedy anything right now.
BTW, I have a 32-bit big-endian system with char being unsigned
by default. The varargs stuff is odd too.
next reply other threads:[~2004-09-17 17:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-17 16:55 Albert Cahalan [this message]
2004-09-17 17:51 ` nproc: So? Roger Luethi
2004-09-18 12:40 ` Albert Cahalan
2004-09-19 10:39 ` Roger Luethi
2004-09-19 12:29 ` Albert Cahalan
2004-09-19 13:57 ` Roger Luethi
-- strict thread matches above, loose matches on Subject: below --
2004-09-08 18:40 [0/1][ANNOUNCE] nproc v2: netlink access to /proc information Roger Luethi
2004-09-16 21:43 ` nproc: So? 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=1095440131.3874.4626.camel@cube \
--to=albert@users.sf.net \
--cc=linux-kernel@vger.kernel.org \
--cc=rl@hellgate.ch \
/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