After running through a number of tests, I have some patches to submit
for the mainline perfmon2 POWER port. There are a number of issues that
1) Missing #include of unistd.h causes a build problem.
2) Accessing HID0 on a partitioned system will cause a crash because the
hypervisor disallows it.
3) Calling pfm_power6_enable_counters the first time causes a hang
problem because that function calls pfm_power6_disable_counters first
and that function makes some assumptions about a kernel timer having
been initialized already. This call needs to be removed.
4) On POWER6, we use the cpu number to index into certain data
structures, but due to preemption, the cpu we are running on can change
after we've already obtained the cpu number. This is fixed using
5) POWER4 and POWER6 were missing code that disables PMU exceptions
while the context is in MASKED mode. POWER5 had this fix already, but I
had neglected to propagate it to POWER4 and POWER6.
These patches were developed against the 2.6.26-rc9 perfmon2 git from
late last week.
I should note that with these patches in place, I'm still seeing some
kernel hang problems when running the PAPI multiplexing tests
(sdsc*-mpx). I will be looking into that problem soon, but I'd like to
get back to working on the minimal perfmon2 patches first.
Please let me know if there are any issues with these patches.
Thanks for your consideration,
IBM Linux Technology Center, Linux Toolchain