diff options
author | Marissa Wall <marissaw@google.com> | 2017-10-17 10:01:59 -0700 |
---|---|---|
committer | Marissa Wall <marissaw@google.com> | 2017-11-27 15:14:03 -0800 |
commit | 7ca560c1df2cd0ff069c14e326de6b1c5799b1aa (patch) | |
tree | 906d70b3cf0a988c42bea40b406b47382402f1ba | |
parent | 73355fecd56fc28397aefcbb9c29a2657468a0f0 (diff) | |
download | lisa-7ca560c1df2cd0ff069c14e326de6b1c5799b1aa.tar.gz |
experiments/power: Hold wakelock during cpu freq
Hold a wakelock to prevent suspending at any point.
Test: run ./run_cpu_frequency.py
Change-Id: I8e3040177ffb675771ec7ef53ade1d0061cad370
-rwxr-xr-x | experiments/power/eas/run_cpu_frequency.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/experiments/power/eas/run_cpu_frequency.py b/experiments/power/eas/run_cpu_frequency.py index 15bddaa..4896883 100755 --- a/experiments/power/eas/run_cpu_frequency.py +++ b/experiments/power/eas/run_cpu_frequency.py @@ -98,6 +98,9 @@ def experiment(): target.execute("stop thermal-engine") target.execute("stop perfd") + # Take a wakelock + System.wakelock(target, take=True) + # Store governors so they can be restored later governors = [ target.cpufreq.get_governor(cpu) for cpu in cpus] @@ -167,6 +170,9 @@ def experiment(): # Restore non critical tasks target.cgroups.freeze(thaw=True) + # Release wakelock + System.wakelock(target, take=False) + # Stop thermal engine and perfd target.execute("start thermal-engine") target.execute("start perfd") |