Power Management Device Latencies Measurement

From OMAPpedia

Revision as of 14:02, 5 November 2010 by Jpihet (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Contents

PM Devices constraintes measurements

Introduction

To correctly implmeent the device latency constraint support it is needed to get accurate measurements of the system low power modes overhead:

This wiki page details the measurements setup and the results. The latency data is to be fed into the constraints latency patches.

Kernel patches & build

Some kernel changes are required for the kernel instrumentation. The patches and config are attached to this page

<verbatim> 2ae0c90dc76c7b96c192be1a6b7180016ecafc57 tracing, perf: add more power related events e44b2e1cdf19039771e02b3f1a021f9c3c43cf68 perf: add suspend tracepoint calls 2e7387e37300f490de6a29c231bf61849f0a8a2e OMAP3: clean up ASM idle code e7eeedd4c3a5d102d57d53707b322806cd21365e OMAP3: add low power entry/exit latency trace points </verbatim>

<verbatim> 17f9faf3bc2c3d643a48624779acd90d2d499f2c OMAP3: Add HW tracing code </verbatim>

Changes: DSS for Beagle, Initramfs Busybox root FS

HW traces details

The trace points are connected on Beagleboard rev B7.

Because of the difficulty to add trace code for HW/SW tracing in the early wake-up code path, the MPU context restore code in ASM (triggered by the ROM code) until the MMU is re-enabled is considered as part of the HW wake-up sequence. This is valid for OFF mode only.

!Warning! The HW power supplies and external clocks are not cut off in this config (no support in l-o), so the HW latencies are lower than expected. The measurements from TI are used for the real HW latency.

Here are some scope screenshots showing the time delta between the wake-up event (USER button press, trace A) and the end of omap_sram_idle (USR1 Led), for both RET and OFF mode.

Scope capture ret.jpg
Scope capture off.jpg

SW trace usage

Enable the power events and dump the trace: <verbatim>

  1. echo 1 > /debug/tracing/events/power/enable
  2. cat /debug/tracing/trace_pipe &

</verbatim>

Trigger the suspend, RET mode: <verbatim>

  1. echo 0 > /debug/pm_debug/enable_off_mode
  2. echo mem > /sys/power/state

[ 3966.216278] PM: Syncing filesystems ... done. [ 3966.221557] Freezing user space processes ... (elapsed 0.02 seconds) done. [ 3966.249267] Freezing remaining freezable tasks ... (elapsed 0.02 seconds) done. [ 3966.281188] Suspending console(s) (use no_console_suspend to debug) [ 3966.404327] PM: suspend of devices complete after 112.426 msecs [ 3966.406127] PM: late suspend of devices complete after 1.739 msecs [ 3966.406158] Disabling non-boot CPUs ... [ 3967.267150] Successfully put all powerdomains to target state [ 3967.267791] PM: early resume of devices complete after 0.396 msecs [ 3967.686279] PM: resume of devices complete after 418.243 msecs [ 3967.726715] Restarting tasks ... done.

             sh-503   [000]  3966.406433: power_start: type=3 state=3 cpu_id=0    => Enter OMAP idle function
             sh-503   [000]  3966.406494: power_start: type=4 state=1 cpu_id=0    => First suspend trace point
             sh-503   [000]  3966.406525: power_start: type=4 state=2 cpu_id=0    => ...
             sh-503   [000]  3966.406555: power_start: type=4 state=3 cpu_id=0
             sh-503   [000]  3966.406586: power_start: type=4 state=4 cpu_id=0
             sh-503   [000]  3966.406616: power_start: type=4 state=5 cpu_id=0
             sh-503   [000]  3966.406647: power_start: type=4 state=6 cpu_id=0
             sh-503   [000]  3966.406647: power_start: type=4 state=7 cpu_id=0
             sh-503   [000]  3966.406647: power_start: type=4 state=8 cpu_id=0    => Last trace for low power enter, just before WFI
             sh-503   [000]  3967.266937: power_start: type=5 state=1 cpu_id=0    => First wake-up trace point, at return from omap34xx_save_cpu_context_wfi
             sh-503   [000]  3967.266937: power_start: type=5 state=2 cpu_id=0    => ...
             sh-503   [000]  3967.266937: power_start: type=5 state=3 cpu_id=0
             sh-503   [000]  3967.266937: power_start: type=5 state=4 cpu_id=0
             sh-503   [000]  3967.267029: power_start: type=5 state=5 cpu_id=0
             sh-503   [000]  3967.267059: power_start: type=5 state=6 cpu_id=0
             sh-503   [000]  3967.267120: power_start: type=5 state=7 cpu_id=0    => Last wake-up trace point, at the end of omap_sram_idle
             sh-503   [000]  3967.267181: power_start: type=3 state=0 cpu_id=0    => Exit OMAP idle function

</verbatim>

With OFF mode enabled: <verbatim>

  1. echo 1 > /debug/pm_debug/enable_off_mode
  2. echo mem > /sys/power/state

[ 1898.722778] PM: Syncing filesystems ... done. [ 1898.728057] Freezing user space processes ... (elapsed 0.02 seconds) done. [ 1898.755950] Freezing remaining freezable tasks ... (elapsed 0.02 seconds) done. [ 1898.787872] Suspending console(s) (use no_console_suspend to debug) [ 1898.910980] PM: suspend of devices complete after 112.396 msecs [ 1898.912780] PM: late suspend of devices complete after 1.739 msecs [ 1898.912811] Disabling non-boot CPUs ... [ 1900.083923] Successfully put all powerdomains to target state [ 1900.084686] PM: early resume of devices complete after 0.488 msecs [ 1900.514953] PM: resume of devices complete after 429.962 msecs [ 1900.555725] Restarting tasks ... done.

             sh-503   [000]  1898.913086: power_start: type=3 state=3 cpu_id=0    => Enter OMAP idle function
             sh-503   [000]  1898.913147: power_start: type=4 state=1 cpu_id=0    => First suspend trace point
             sh-503   [000]  1898.913147: power_start: type=4 state=2 cpu_id=0    => ...
             sh-503   [000]  1898.913208: power_start: type=4 state=3 cpu_id=0
             sh-503   [000]  1898.913239: power_start: type=4 state=4 cpu_id=0
             sh-503   [000]  1898.913269: power_start: type=4 state=5 cpu_id=0
             sh-503   [000]  1898.913391: power_start: type=4 state=6 cpu_id=0
             sh-503   [000]  1898.913391: power_start: type=4 state=7 cpu_id=0
             sh-503   [000]  1898.914337: power_start: type=4 state=8 cpu_id=0    => Last trace for low power enter, just before WFI
             sh-503   [000]  1900.083405: power_start: type=5 state=1 cpu_id=0    => First wake-up trace point, at return from omap34xx_save_cpu_context_wfi
             sh-503   [000]  1900.083466: power_start: type=5 state=2 cpu_id=0    => ...
             sh-503   [000]  1900.083496: power_start: type=5 state=3 cpu_id=0
             sh-503   [000]  1900.083588: power_start: type=5 state=4 cpu_id=0
             sh-503   [000]  1900.083771: power_start: type=5 state=5 cpu_id=0
             sh-503   [000]  1900.083801: power_start: type=5 state=6 cpu_id=0
             sh-503   [000]  1900.083862: power_start: type=5 state=7 cpu_id=0    => Last wake-up trace point, at the end of omap_sram_idle
             sh-503   [000]  1900.083954: power_start: type=3 state=0 cpu_id=0    => Exit OMAP idle function

</verbatim>

Timings results

Full RET mode

Full OFF mode

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox