| 1 |
What: /sys/bus/event_source/devices/cpu.../rdpmc |
| 2 |
Date: November 2011 |
| 3 |
KernelVersion: 3.10 |
| 4 |
Contact: Linux kernel mailing list [email protected] |
| 5 |
Description: The /sys/bus/event_source/devices/cpu.../rdpmc attribute |
| 6 |
is used to show/manage if rdpmc instruction can be |
| 7 |
executed in user space. This attribute supports 3 numbers. |
| 8 |
- rdpmc = 0 |
| 9 |
user space rdpmc is globally disabled for all PMU |
| 10 |
counters. |
| 11 |
- rdpmc = 1 |
| 12 |
user space rdpmc is globally enabled only in event mmap |
| 13 |
ioctl called time window. If the mmap region is unmapped, |
| 14 |
user space rdpmc is disabled again. |
| 15 |
- rdpmc = 2 |
| 16 |
user space rdpmc is globally enabled for all PMU |
| 17 |
counters. |
| 18 |
|
| 19 |
In the Intel platforms supporting counter level's user |
| 20 |
space rdpmc disable feature (CPUID.23H.EBX[2] = 1), the |
| 21 |
meaning of 3 numbers is extended to |
| 22 |
- rdpmc = 0 |
| 23 |
global user space rdpmc and counter level's user space |
| 24 |
rdpmc of all counters are both disabled. |
| 25 |
- rdpmc = 1 |
| 26 |
No changes on behavior of global user space rdpmc. |
| 27 |
counter level's rdpmc of system-wide events is disabled |
| 28 |
but counter level's rdpmc of non-system-wide events is |
| 29 |
enabled. |
| 30 |
- rdpmc = 2 |
| 31 |
global user space rdpmc and counter level's user space |
| 32 |
rdpmc of all counters are both enabled unconditionally. |
| 33 |
|
| 34 |
The default value of rdpmc is 1. |
| 35 |
|
| 36 |
Please notice: |
| 37 |
- global user space rdpmc's behavior would change |
| 38 |
immediately along with the rdpmc value's change, |
| 39 |
but the behavior of counter level's user space rdpmc |
| 40 |
won't take effect immediately until the event is |
| 41 |
reactivated or recreated. |
| 42 |
- The rdpmc attribute is global, even for x86 hybrid |
| 43 |
platforms. For example, changing cpu_core/rdpmc will |
| 44 |
also change cpu_atom/rdpmc. |