Re: Pentium MSRs

Stephan Meyer (Stephan.Meyer@pobox.com)
Tue, 14 Oct 1997 21:43:02 +0000 (GMT)


[ I hope you (Riccardo) don't mind my forwarding this to linux-kernel ]

On Tue, 14 Oct 1997, Riccardo Facchetti wrote:
> I think having the Pentium Counters info handy may be interesting, but I
> think they may be "more handy" if you make it available trought the
> /proc/ filesystem. May be in the /proc/sys/ subdir (sysctl() interface)
> This way you could have something like:
>
> /proc/sys/pentium/data_read
> /proc/sys/pentium/data_write
> /proc/sys/pentium/data_tlb_miss
> ... etc ...
>
> An user can activate a counter writing something (I remember that
> something is needed to activate the counters) to the counter file, then he
> can see the counter value simply catting the file. Something like:
>
> echo "on" > data_read && cat data_read # init and read initial value
> sleep 10
> cat data_read # read the counter after 10 secs
> echo "off" > data_read # stop data_read counter
>
> Oh ... and check what can be done if you have an SMP machine.

The problem is that you might not want to have Joe user fiddle around with
MSR settings. With a device, the sysadmin can easily set the permissions
by hand. It is my understanding, that, with the proc device, you'd have to
patch the kernel.

What is the sysctl() interface?

> Riccardo.

------------------------------------------------
Stephan.Meyer@pobox.com
meyerst@informatik.uni-muenchen.de
http://pobox.com/~stephan.meyer/
2A 64 F0 73 02 91 10 FC 18 CC 83 1E E2 2C 7E 79

So what would an angel say
The devil wants to know