Paul Mackerras
37d8182838
perf_counter: add an mmap method to allow userspace to read hardware counters
...
Impact: new feature giving performance improvement
This adds the ability for userspace to do an mmap on a hardware counter
fd and get access to a read-only page that contains the information
needed to translate a hardware counter value to the full 64-bit
counter value that would be returned by a read on the fd. This is
useful on architectures that allow user programs to read the hardware
counters, such as PowerPC.
The mmap will only succeed if the counter is a hardware counter
monitoring the current process.
On my quad 2.5GHz PowerPC 970MP machine, userspace can read a counter
and translate it to the full 64-bit value in about 30ns using the
mmapped page, compared to about 830ns for the read syscall on the
counter, so this does give a significant performance improvement.
Signed-off-by: Paul Mackerras <paulus@samba.org >
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl >
Orig-LKML-Reference: <20090323172417.297057964@chello.nl >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2009-04-06 09:30:26 +02:00
..
2009-03-26 18:14:15 +01:00
2009-04-03 10:39:20 -07:00
2009-04-05 00:32:22 +02:00
2009-03-31 09:56:26 +01:00
2009-03-26 22:45:23 -07:00
2009-03-26 18:14:14 +01:00
2009-03-26 16:11:41 -07:00
2009-03-31 15:09:39 +11:00
2009-03-31 09:56:29 +01:00
2009-04-02 19:04:51 -07:00
2009-03-28 15:54:48 -04:00
2009-03-30 15:22:03 +02:00
2009-03-24 16:38:23 -07:00
2009-04-05 02:14:15 -04:00
2009-03-26 18:14:14 +01:00
2009-03-25 09:13:25 -07:00
2009-03-26 11:20:23 -07:00
2009-03-26 18:14:15 +01:00
2009-03-26 18:14:15 +01:00
2009-04-01 08:59:23 -07:00
2009-04-01 08:59:23 -07:00
2009-04-02 19:05:01 -07:00
2009-03-24 12:35:17 +01:00
2009-04-01 08:59:14 -07:00
2009-03-28 13:30:43 -07:00
2009-04-02 21:09:10 -07:00
2009-04-03 15:24:35 -07:00
2009-03-27 14:51:13 +01:00
2009-03-26 18:14:15 +01:00
2009-03-26 18:14:14 +01:00
2009-04-04 14:20:34 -07:00
2009-03-26 18:14:23 +01:00
2009-04-03 14:53:32 -07:00
2009-03-24 16:38:26 -07:00
2009-04-02 19:05:00 -07:00
2009-04-02 19:04:57 -07:00
2009-03-26 18:14:14 +01:00
2009-03-27 14:43:59 -04:00
2009-04-02 19:55:28 +01:00
2009-03-24 16:38:26 -07:00
2009-03-26 18:14:15 +01:00
2009-04-02 19:55:30 +01:00
2009-03-26 18:14:15 +01:00
2009-03-24 09:42:54 +00:00
2009-03-26 09:48:09 -07:00
2009-03-30 21:46:44 +02:00
2009-04-03 14:53:32 -07:00
2009-04-01 15:42:34 -07:00
2009-03-24 16:38:27 -07:00
2009-04-01 08:59:20 -07:00
2009-04-03 11:10:33 -07:00
2009-04-01 08:59:29 -07:00
2009-03-24 20:56:50 +01:00
2009-03-31 23:00:26 -04:00
2009-04-02 21:09:10 -07:00
2009-04-03 16:42:37 +01:00
2009-04-03 16:42:39 +01:00
2009-04-01 08:59:22 -07:00
2009-03-24 16:43:12 +01:00
2009-03-24 12:35:17 +01:00
2009-04-01 21:42:26 +02:00
2009-03-30 15:14:53 +02:00
2009-04-03 09:48:29 -07:00
2009-03-28 21:34:44 +01:00
2009-03-30 12:43:28 -03:00
2009-03-28 21:34:45 +01:00
2009-03-31 20:15:33 +02:00
2009-04-02 19:04:53 -07:00
2009-03-27 20:13:02 -04:00
2009-03-26 18:14:15 +01:00
2009-03-28 13:30:43 -07:00
2009-03-27 00:46:44 -07:00
2009-03-26 18:14:14 +01:00
2009-04-06 09:30:15 +02:00
2009-04-03 10:36:57 -07:00
2009-04-02 00:49:02 +02:00
2009-03-24 09:42:54 +00:00
2009-03-26 18:14:15 +01:00
2009-03-31 01:14:44 +04:00
2009-03-30 21:46:54 +02:00
2009-03-27 17:28:43 +01:00
2009-03-30 12:43:22 -03:00
2009-03-26 18:14:15 +01:00
2009-03-25 23:35:46 -04:00
2009-04-03 15:24:35 -07:00
2009-03-26 18:14:17 +01:00
2009-03-31 13:05:32 +10:30
2009-04-02 19:04:49 -07:00
2009-04-06 09:02:57 +02:00
2009-04-05 11:04:19 -07:00
2009-03-31 13:05:35 +10:30
2009-03-24 16:38:26 -07:00
2009-03-24 11:03:11 +02:00
2009-03-24 11:02:55 +02:00
2009-03-24 11:03:15 +02:00
2009-03-30 15:21:59 +02:00
2009-04-02 19:05:10 -07:00
2009-04-01 08:59:17 -07:00
2009-03-26 18:14:15 +01:00
2009-04-02 19:04:56 -07:00
2009-04-05 11:04:19 -07:00
2009-04-02 19:04:48 -07:00
2009-04-02 19:04:48 -07:00
2009-04-05 10:33:07 -07:00
2009-03-31 23:00:27 -04:00
2009-03-24 16:38:24 -07:00
2009-04-05 11:04:19 -07:00
2009-03-31 13:05:30 +10:30
2009-03-26 10:56:35 -07:00
2009-04-01 07:38:54 -04:00
2009-03-26 18:14:14 +01:00
2009-03-27 14:44:00 -04:00
2009-03-28 13:30:43 -07:00
2009-03-24 16:37:55 -07:00
2009-03-28 23:55:58 -07:00
2009-04-03 16:42:42 +01:00
2009-04-03 16:42:44 +01:00
2009-04-03 16:42:43 +01:00
2009-04-01 13:28:15 -04:00
2009-03-27 20:13:04 -04:00
2009-03-31 23:00:27 -04:00
2009-04-02 19:04:56 -07:00
2009-04-01 08:59:13 -07:00
2009-04-03 16:42:36 +01:00
2009-04-03 16:42:39 +01:00
2009-04-01 08:59:13 -07:00
2009-04-02 19:05:03 -07:00
2009-03-26 16:02:30 -07:00
2009-04-01 09:47:12 -07:00
2009-04-06 09:30:26 +02:00
2009-03-26 18:14:15 +01:00
2009-03-24 16:38:26 -07:00
2009-03-24 16:38:26 -07:00
2009-04-01 08:59:13 -07:00
2009-03-27 22:23:52 -04:00
2009-03-26 18:14:14 +01:00
2009-03-31 01:14:44 +04:00
2009-04-02 19:05:00 -07:00
2009-03-30 15:22:01 +02:00
2009-03-26 02:18:35 +01:00
2009-03-26 02:18:37 +01:00
2009-03-30 14:28:58 -07:00
2009-03-30 12:16:38 -07:00
2009-03-30 12:16:39 -07:00
2009-03-30 12:33:01 -07:00
2009-03-30 12:16:39 -07:00
2009-04-02 19:04:51 -07:00
2009-04-01 08:59:24 -07:00
2009-04-06 09:30:15 +02:00
2009-03-28 15:01:37 +11:00
2009-03-26 18:14:15 +01:00
2009-03-30 22:05:11 +10:30
2009-03-29 01:40:34 -07:00
2009-04-03 16:42:35 +01:00
2009-04-02 00:49:02 +02:00
2009-03-26 16:11:41 -07:00
2009-03-27 12:18:56 -04:00
2009-04-02 19:05:11 -07:00
2009-04-05 10:30:21 -07:00
2009-03-26 18:14:14 +01:00
2009-04-01 08:59:16 -07:00
2009-04-01 08:59:15 -07:00
2009-04-02 19:05:01 -07:00
2009-04-06 09:02:57 +02:00
2009-03-27 16:58:22 -04:00
2009-03-26 18:14:14 +01:00
2009-03-30 17:17:35 -07:00
2009-03-27 12:59:54 +08:00
2009-03-26 18:14:14 +01:00
2009-04-02 19:05:00 -07:00
2009-04-01 08:59:10 -07:00
2009-03-26 18:14:21 +01:00
2009-03-24 16:38:24 -07:00
2009-03-24 16:20:34 -07:00
2009-03-24 16:20:36 -07:00
2009-03-26 18:14:14 +01:00
2009-03-30 12:43:40 -03:00
2009-03-30 12:43:15 -03:00
2009-04-01 08:59:20 -07:00
2009-04-02 19:04:50 -07:00
2009-04-01 08:59:13 -07:00
2009-03-26 18:14:14 +01:00