Re: PROPOSAL: dot-proc interface [was: /proc stuff]

From: Jakob Østergaard (jakob@unthought.net)
Date: Sun Nov 04 2001 - 15:06:19 EST


On Sun, Nov 04, 2001 at 02:52:56PM -0500, Alexander Viro wrote:
>
>
> On Sun, 4 Nov 2001, [iso-8859-1] Jakob %stergaard wrote:
>
> > > If you feel it's too hard to write use scanf(), use sh, awk, perl
> > > etc. which all have their own implementations that appear to have
> > > served UNIX quite well for a long while.
> >
> > Witness ten lines of vmstat output taking 300+ millions of clock cycles.
>
> Would the esteemed sir care to check where these cycles are spent?
> How about "traversing page tables of every damn process out there"?
> Doesn't sound like a string operation to me...
>

I'm sure your're right. It's probably not just string operations. And maybe
then don't even dominate.

And I'm sure that vmstat doesn't use sh, awk, and perl either.

Anyway, the efficiency issues was mainly me getting side-tracked from the main
issue as I see it.

The point I wanted to make was, that we need an interface thats possible to
parse "correctly", not "mostly correctly", and we need to be able to parse it
in a way so that we do not have to rely on a myriad of small tools (that change
over time too).

You need something that's simple and correct. If it's ASCII, well let it be
ASCII. But /proc as it is today is not possible to parse reliably. See my "cat
vs. c)(a" example. You can parse it "mostly reliable", but that's just not
good enough.

-- 
................................................................
:   jakob@unthought.net   : And I see the elder races,         :
:.........................: putrid forms of man                :
:   Jakob Østergaard      : See him rise and claim the earth,  :
:        OZ9ABN           : his downfall is at hand.           :
:.........................:............{Konkhra}...............:
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Nov 07 2001 - 21:00:23 EST