Re: [RFC] Scalable statistics counters using kmalloc_percpu

Andrew Morton (akpm@zip.com.au)
Mon, 29 Jul 2002 11:23:06 -0700


Ravikiran G Thirumalai wrote:
>
> ...
>
> > General comment: we need to clean up the kernel_stat stuff. We
> > cannot just make it per-cpu because it is 32k in size already. I
> > would suggest that we should break out the disk accounting and
> > make the rest of kernel_stat per CPU.
> >
> > That would be a great application of your interface, and a good
> > way to get your interface merged ;) Is that something which you
> > have time to do?
>
> Sure,... anything to get these interfaces merged :)

Well Rusty's point about just using the percpu API seemed
reasonable - that's basically equivalent to statically defining
the data. In what situation is dynamic allocation needed?

Well, in modules for one. Unless we work out a way to make the
percpu API work with storage which is defined within modules.

> Are you looking at something on the lines as the diff below?

Looks nice.

> What about /proc/stat ? Is it a good idea to have separate /proc files
> for disk stats and cpu usage stats? (It'll be good for statctrs that way,
> applications monitoring disk_stats only don't cause statctr_reads on
> cpu_usage stats then)

Stick with the existing format, I'd say. Numerous applications
would break otherwise.

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