Open tilsche opened 5 years ago
Dear @tilsche , this ticket does not describe whats wrong, but what's fixed, which makes it hard to comprehend. However, I think that's merged by now. Could I get access to the system you're talking check the x86_adapt / msr part? I would also do some rewriting to make it more robust. What would you suggest as the default mechanism? I'd go with sysfs due to the lowest privilege level required.
Dear @tilsche, please try branch fix_issue_8
Looks good with the example (that failed previously):
Architecture: Intel RAPL
Testing source sysfs-powercap-rapl
Try counter 0
avail for granularity 1. There are 1 devices avail for this counter, testing 0
Read value 6.312832e+03
Read value 1.888667e+00
Read value 1.867610e+00
Read value 2.238093e+00
Try counter 1
avail for granularity 1. There are 1 devices avail for this counter, testing 0
Read value 2.302088e+03
Read value 3.093870e-01
Read value 2.998650e-01
Read value 2.885120e-01
Try counter 2
avail for granularity 1. There are 1 devices avail for this counter, testing 0
Read value 1.740514e+03
Read value 6.643660e-01
Read value 6.552110e-01
Read value 9.362770e-01
Try counter 3
avail for granularity 1. There are 1 devices avail for this counter, testing 0
Read value 5.613498e+02
Read value 9.357270e-01
Read value 7.574500e-02
Read value 4.846200e-02
Try counter 4
avail for granularity 0. There are 1 devices avail for this counter, testing 0
Read value 1.619076e+04
Read value 5.522752e+00
Read value 5.584520e+00
Read value 5.727646e+00
Testing source perf-rapl
Try counter 0
avail for granularity 1. There are 1 devices avail for this counter, testing 0
Read value 0.000000e+00
Read value 1.789551e+00
Read value 1.709839e+00
Read value 1.714111e+00
Try counter 1
avail for granularity 1. There are 1 devices avail for this counter, testing 0
Read value 6.103516e-05
Read value 2.597046e-01
Read value 2.546387e-01
Read value 2.701416e-01
Try counter 2
avail for granularity 1. There are 1 devices avail for this counter, testing 0
Read value 0.000000e+00
Read value 6.387939e-01
Read value 8.984375e-01
Read value 6.381226e-01
Try counter 3
avail for granularity 1. There are 1 devices avail for this counter, testing 0
Read value 0.000000e+00
Read value 4.724121e-02
Read value 4.730225e-02
Read value 4.736328e-02
Try counter 4
avail for granularity 0. There are 1 devices avail for this counter, testing 0
Read value 0.000000e+00
Read value 5.698242e+00
Read value 5.553223e+00
Read value 5.440613e+00
Testing source msr-rapl
Init failed
(I have no /dev/msr on the system)
Thanks
With c83db45, it works with perf on my system.
I also tested sysfs where it fails.
setup
assumes all domains have/name
a like"package-<N>"
. The name is actuallypsys
. Everything fails then...Did not yet test x86_adapt or msr.
If we don't want to support it with all access methods, it should be documented and we should consider picking a method that generally works and prioritize that.