2002-08-07 19:00:51

by Andrew Morton

[permalink] [raw]
Subject: Re: [Lse-tech] [patch] Scalable statistics counters with /proc reporting

Christoph Hellwig wrote:
>
> ...
> Also the /proc-based implementation is really ugly. It should be moved
> over to the seq_file interface at least, a simple ramfs-style own
> filesystem ("stats" filesystem type) would be the cleanest solution.

I'd suggest that it be just a single stat counter per /proc
file. A simple sprintf is fine for that.

If it's necessary to write a new filesystem to just export a bunch
of integers to userspace then something is seriously wrong.


2002-08-08 04:38:54

by Ravikiran G Thirumalai

[permalink] [raw]
Subject: Re: [Lse-tech] [patch] Scalable statistics counters with /proc reporting

On Wed, Aug 07, 2002 at 12:02:14PM -0700, Andrew Morton wrote:
> Christoph Hellwig wrote:
> >
> > ...
> > Also the /proc-based implementation is really ugly. It should be moved
> > over to the seq_file interface at least, a simple ramfs-style own
> > filesystem ("stats" filesystem type) would be the cleanest solution.
>
> I'd suggest that it be just a single stat counter per /proc
> file. A simple sprintf is fine for that.
>
> If it's necessary to write a new filesystem to just export a bunch
> of integers to userspace then something is seriously wrong.

Yes, that was how my previous release worked. But Rik wanted to be able
to group a bunch of counters into a single /proc file for his use.
Rik, your comments please... what do you prefer? current /proc style,
seq_file, or the earlier "one counter per /proc" style?

Thanks,
Kiran