Power Management Device Latencies Measurement

From OMAPpedia

(Difference between revisions)
Jump to: navigation, search
Line 12: Line 12:
Some kernel changes are required for the kernel instrumentation. The patches and config are attached to this page
Some kernel changes are required for the kernel instrumentation. The patches and config are attached to this page
-
* Starting point: linux-omap master branch at commit ''a83d12a47c9a8c78a184910150797045d69a1570 Linux-omap rebuilt: Updated to v2.6.36, add 24xx uart fix'' (http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a=commit;h=a83d12a47c9a8c78a184910150797045d69a1570])
+
* Starting point: linux-omap master branch at commit [[http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a=commit;h=a83d12a47c9a8c78a184910150797045d69a1570 | a83d12a47c9a8c78a184910150797045d69a1570 Linux-omap rebuilt: Updated to v2.6.36, add 24xx uart fix]]
* khilman's patch to fix the low power mode: ''1e91c5f70da4d7d108cbcf026164d001e0e688b3 OMAP: bus-level PM: enable use of runtime PM API for suspend/resume'' (http://git.kernel.org/?p=linux/kernel/git/khilman/linux-omap-pm.git;a=commitdiff;h=20b9e9aa97cf811e799420b9096235eb67ef6191)
* khilman's patch to fix the low power mode: ''1e91c5f70da4d7d108cbcf026164d001e0e688b3 OMAP: bus-level PM: enable use of runtime PM API for suspend/resume'' (http://git.kernel.org/?p=linux/kernel/git/khilman/linux-omap-pm.git;a=commitdiff;h=20b9e9aa97cf811e799420b9096235eb67ef6191)

Revision as of 14:34, 5 November 2010

Contents

PM Devices constraintes measurements

Introduction

To correctly implement 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

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
17f9faf3bc2c3d643a48624779acd90d2d499f2c OMAP3: Add HW tracing code

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 RET mode, showing a delta of 408us:

Scope capture ret.jpg

For OFF mode, showing a delta of 2700us:

Scope capture off.jpg

SW trace usage

Enable the power events and dump the trace:

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

Trigger the suspend, RET mode:

# echo 0 > /debug/pm_debug/enable_off_mode
# 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 suspend
              sh-503   [000]  3966.406494: power_start: type=4 state=1 cpu_id=0    => First suspend trace point in omap_sram_idle
              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 suspend

With OFF mode enabled:

# echo 1 > /debug/pm_debug/enable_off_mode
# 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 suspend
              sh-503   [000]  1898.913147: power_start: type=4 state=1 cpu_id=0    => First suspend trace point in omap_sram_idle
              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 suspend

Timings results

Full RET mode

Full OFF mode

Attachments

Kernel patches and config

File:OMAP latency measurements patches and config.tar.gz

--Jpihet 14:21, 5 November 2010 (UTC)

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox