Re: [PATCH][1/7] perfctr-2.7.2 for 2.6.6-mm2: core

From: Andrew Morton
Date: Fri May 14 2004 - 17:58:11 EST


Mikael Pettersson <mikpe@xxxxxxxxx> wrote:
>
> - core driver files and kernel changes

Looks like we need six system calls if we're going to do it that way.

All that marshalling and unmarshalling code is a bit evil. I wonder if
there's some way in which it can be flattened out.

One option would be to present all the info to userspace as a virtual
filesystem, although it would be a bit weird that the contents of the
"files" depends upon the process which reads them.

Maybe a mkdir() on that filesystem could create a directory which contains
files which contain the counters for the process which made the directory?
The directory would need to be auto-rmdir'ed on process exit. It's
basically the same semantics as /proc/pid.

But /proc/pid can be read by processes other than "pid". Does the same
apply to the perfcntr instrumentation? (Being able to read another
process's perfcntr info sounds useful. Is it?)

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/