Skip to content
Commit 5513f702 authored by Lukasz Luba's avatar Lukasz Luba Committed by Deepak Kumar Mishra
Browse files

[RFC][DON'T MERGE] TESTING: EXAMPLE: power allocator modifying EM at runtime



====================================================================
Important Note:
This is an experimental patch aiming to discuss/test the idea of
runtime modifiable EM. It tries to address the impact of static power
(leakage) change in time due to different temperature of the chip.
The purpose of sharing this patch is to get feedback from Vendors
making the real SoCs, and gather details such as:
- does it address the problem
- doesn't contain design restrictions (such as values scale, math
model),
- performs fast&smooth (lack of unacceptable delays in runtime updates)
- fits into the right running context of the EM modifier (e.g. thermal
governor, driver IRQ handler, etc)
- allows for optimizations and/or differentiation of the power vs.
  performance policy
After positive feedback and results the goal is to share this work
on the Linux Kernel Mailing List (together with justification) to
make it available in upstream/Android/production kernels.
====================================================================

This is an example scaling mechanism for the EM power values.
The modification of EM is done every IPA polling ms interval, e.g. 100ms,
when IPA is in control mode (temp > switch on temp).

To change the scaling value, write the desired temperature into the
thermal zone, e.g.:
echo 72000 > /sys/class/thermal/thermal_zone0/emul_temp
Any value bigger than trip_point_0_temp should enable this test mode.

To observe the modified values, enable tracing of the EM event:
echo 1 > /sys/kernel/debug/tracing/events/energy_model/enable

Then read the trace:
tail /sys/kernel/debug/tracing/trace

Make sure also that IPA is set as the governor, e.g. just write:
echo power_allocator > /sys/class/thermal/thermal_zone0/policy
into your thermal zone.

Signed-off-by: Lukasz Luba's avatarLukasz Luba <lukasz.luba@arm.com>
parent c1950ca1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment