Re: ps performance sucks (was Re: dcache_rcu [performance results])

Erik Andersen
2002-11-05T04:35:46Z

On Tue Nov 05, 2002 at 12:57:45AM -0300, Werner Almesberger wrote:
> Martin J. Bligh wrote:
> > I had a very brief think about this at the weekend, seeing
> > if I could make a big melting pot /proc/psinfo file
>
> You could take a more radical approach. Since the goal of such
> a psinfo file would be to accelerate access to information
> that's already available elsewhere, you can do away with many
> of the niceties of procfs, e.g.
>
> - no need to be human-readable (e.g. binary or hex dump may
> make sense in this case)
> - may use other operations than just open and read (e.g.

Hehe. You just reinvented my old /dev/ps driver. :)

http://www.busybox.net/cgi-bin/cvsweb/busybox/examples/kernel-patches/devps.patch.9_25_2000?rev=1.2&content-type=text/vnd.viewcvs-markup

This is what Linus has to say on the subject:

I do dislike /dev/ps mightily. If the problem is that /proc
is too large, then the right solution is to just clean up
/proc. Which is getting done. And yes, /proc will be larger
than /dev/ps, but I still find that preferable to having two
incompatible ways to do the same thing.

-Erik

--
Erik B. Andersen http://codepoet-consulting.com/
--This message was written using 73% post-consumer electrons--