linaro-swg / linux

Linux kernel source tree
Other
41 stars 79 forks source link

benchmark: use arm generic timers as time/tick source #51

Closed igoropaniuk closed 6 years ago

igoropaniuk commented 6 years ago

Switching to ARM Generic timers solves these problems:

  1. Avoid any collisions with linux kernel perf subsystem when using PMU as a tick source. Although perf subystem has a kernel API(perf_event_create_kernel_counter etc.), unfortunately it doesn't have any capabilites to enable EL0 access to cycle counter on armv7/armv8 architectures (only for x86 platforms, where it's possible to set bit which permits executing rdtsc from usermode)
  2. Avoid any conditions, when frequency scaling occurs (moslty different power states), or core is in wait-for-interrupt/wait-for-events states (PMU doesn't count CPU cycles in these states).
  3. Common tick source for all cores with fixed frequency

PL1 physical timer runs at frequency typically in the range 1-50MHz.

Signed-off-by: Igor Opaniuk <igor.opaniuk@linaro.org>

jbech-linaro commented 6 years ago

Acked-by: Joakim Bech <joakim.bech@linaro.org>

igoropaniuk commented 6 years ago

Tag applied and rebased. Thanks!

igoropaniuk commented 6 years ago

closing PR as it's obsolete and should be reworked