I'd like to start a discussion on adding an ability to delegate hardware performance monitoring counters to S/HS mode, and further to VS mode. In “Rich OS” server environments, PMU resources are managed by the kernel, kernel driver, and/or hypervisor. Counters may be configured with differing scopes, in some cases counting events system-wide, while in others counting events on behalf of a single virtual machine or application. In such environments, the latency of counter writes has a direct impact on overall profiling overhead as a result of frequent counter writes during:
* Sample collection, to clear overflow indication and reload the counter(s)
* Context switch, between processes, threads, containers, or virtual machines
The goal of this discussion would be to avert transitions to M mode that add latency to these performance critical supervisor/hypervisor code sections.
Assuming there's no objection, I'd like to get a few interested parties together to work up a proposal which would then be brought to this group. Let me know if that's not the right approach, otherwise anyone interested in working on this should drop me a line.