Hi, I'm doing a bunch of high-performance computing benchmarking on ARM -- the benchmarks and runtimes like to have a fine-grained cycle counter that is available from user space (something like MFTB on PowerPC), so I've been using the PMU cycle counter in a similar fashion to what has been documented here: https://groups.google.com/forum/?fromgroups=#%21topic/beagleboard/4VUJyOJx2r...
The downside is that I have to have a kernel module which enables it's use by user space, which complicates up-streaming ARM versions of the various benchmarks (as I don't want to have to include a kernel module with them....).
It would seem to me that it would be better to have a sysfs interface (or something similar) which allowed privileged users to enable/disable user-land access to the PMU in the mainstream kernel. This could also help with arbitrating access to PMU from conflicting sources (such as trying to use the CCNT from user-space when it is being used by oprofile).
I'm open to other suggestions, but if this sounds like a good idea I'd be willing to draft a patch to add such an interface (assuming it doesn't already exist elsewhere and I just didn't find it with some quick greps).
Thanks,
-eric
linaro-kernel@lists.linaro.org