Hi Lisa,
Please find the 2 patches we talked about on irc in this patchset.
Regards, Thierry
Thierry Escande (2): functions: fix loop increment in save_frequencies() functions: switch to userspace governor in restore_frequencies()
include/functions.sh | 2 ++ 1 file changed, 2 insertions(+)
The 'index' variable was not incremented ending with only the last cpu frequency saved in $frequencies_backup0.
Signed-off-by: Thierry Escande thierry.escande@linaro.org --- include/functions.sh | 1 + 1 file changed, 1 insertion(+)
diff --git a/include/functions.sh b/include/functions.sh index 0105776..e9f66d1 100644 --- a/include/functions.sh +++ b/include/functions.sh @@ -403,6 +403,7 @@ save_frequencies() { freq_value=$(cat $CPU_PATH/$cpu/cpufreq/scaling_cur_freq) eval $freq_array$index=$freq_value eval export $freq_array$index + index=$((index + 1)) done }
The governor needs to be set to 'userspace' before setting the original frequency back.
This fixes cpufreq_06.sh that otherwise logs 'sh: echo: I/O error' messages in its log file.
Signed-off-by: Thierry Escande thierry.escande@linaro.org --- include/functions.sh | 1 + 1 file changed, 1 insertion(+)
diff --git a/include/functions.sh b/include/functions.sh index e9f66d1..77a8a27 100644 --- a/include/functions.sh +++ b/include/functions.sh @@ -412,6 +412,7 @@ restore_frequencies() { index=0
for cpu in $cpus; do + set_governor $cpu userspace oldfreq=$(eval echo $$freq_array$index) echo $oldfreq > $CPU_PATH/$cpu/cpufreq/scaling_setspeed index=$((index + 1))
Hi Thierry,
On Wed, May 16, 2018 at 6:28 AM, Thierry Escande thierry.escande@linaro.org wrote:
The governor needs to be set to 'userspace' before setting the original frequency back.
This fixes cpufreq_06.sh that otherwise logs 'sh: echo: I/O error' messages in its log file.
Signed-off-by: Thierry Escande thierry.escande@linaro.org
include/functions.sh | 1 + 1 file changed, 1 insertion(+)
diff --git a/include/functions.sh b/include/functions.sh index e9f66d1..77a8a27 100644 --- a/include/functions.sh +++ b/include/functions.sh @@ -412,6 +412,7 @@ restore_frequencies() { index=0
for cpu in $cpus; do
set_governor $cpu userspace oldfreq=$(eval echo \$$freq_array$index) echo $oldfreq > $CPU_PATH/$cpu/cpufreq/scaling_setspeed index=$((index + 1))
I had trouble applying this patch because the lines weren't matching up. This is what I see in the master and android-arm64 branches; there is an extra blank line inside the restore_frequencies() function: https://git.linaro.org/power/pm-qa.git/tree/include/functions.sh#n409
Since it's a one line change, I can manually fix this, but did you have a patch that removed whitespace prior to this one, possibly?
Hi Lisa,
On 17/05/2018 02:10, Lisa Nguyen wrote:
Hi Thierry,
On Wed, May 16, 2018 at 6:28 AM, Thierry Escande thierry.escande@linaro.org wrote:
The governor needs to be set to 'userspace' before setting the original frequency back.
This fixes cpufreq_06.sh that otherwise logs 'sh: echo: I/O error' messages in its log file.
Signed-off-by: Thierry Escande thierry.escande@linaro.org
include/functions.sh | 1 + 1 file changed, 1 insertion(+)
diff --git a/include/functions.sh b/include/functions.sh index e9f66d1..77a8a27 100644 --- a/include/functions.sh +++ b/include/functions.sh @@ -412,6 +412,7 @@ restore_frequencies() { index=0
for cpu in $cpus; do
set_governor $cpu userspace oldfreq=$(eval echo \$$freq_array$index) echo $oldfreq > $CPU_PATH/$cpu/cpufreq/scaling_setspeed index=$((index + 1))
I had trouble applying this patch because the lines weren't matching up. This is what I see in the master and android-arm64 branches; there is an extra blank line inside the restore_frequencies() function: https://git.linaro.org/power/pm-qa.git/tree/include/functions.sh#n409
Since it's a one line change, I can manually fix this, but did you have a patch that removed whitespace prior to this one, possibly?
Nope. I have this blank line locally too. It doesn't show up in the patch because it's out of context.
That's weird. They both apply cleanly on a freshly cloned repo in master and android-arm64 branches...
Regards, Thierry
On Wed, May 16, 2018 at 11:41 PM, Thierry Escande thierry.escande@linaro.org wrote:
Hi Lisa,
On 17/05/2018 02:10, Lisa Nguyen wrote:
Hi Thierry,
On Wed, May 16, 2018 at 6:28 AM, Thierry Escande thierry.escande@linaro.org wrote:
The governor needs to be set to 'userspace' before setting the original frequency back.
This fixes cpufreq_06.sh that otherwise logs 'sh: echo: I/O error' messages in its log file.
Signed-off-by: Thierry Escande thierry.escande@linaro.org
include/functions.sh | 1 + 1 file changed, 1 insertion(+)
diff --git a/include/functions.sh b/include/functions.sh index e9f66d1..77a8a27 100644 --- a/include/functions.sh +++ b/include/functions.sh @@ -412,6 +412,7 @@ restore_frequencies() { index=0
for cpu in $cpus; do
set_governor $cpu userspace oldfreq=$(eval echo \$$freq_array$index) echo $oldfreq > $CPU_PATH/$cpu/cpufreq/scaling_setspeed index=$((index + 1))
I had trouble applying this patch because the lines weren't matching up. This is what I see in the master and android-arm64 branches; there is an extra blank line inside the restore_frequencies() function: https://git.linaro.org/power/pm-qa.git/tree/include/functions.sh#n409
Since it's a one line change, I can manually fix this, but did you have a patch that removed whitespace prior to this one, possibly?
Nope. I have this blank line locally too. It doesn't show up in the patch because it's out of context.
That's weird. They both apply cleanly on a freshly cloned repo in master and android-arm64 branches...
Both patches applied. Please check to be sure.
Cheers, Lisa