Changes in cpufreq_06.sh to calculate summatory and average of frequency measurements.
Signed-off-by: Saul Romero saul.romero@arm.com --- cpufreq/cpufreq_06.sh | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-)
diff --git a/cpufreq/cpufreq_06.sh b/cpufreq/cpufreq_06.sh index b323dc8..a25bbd2 100755 --- a/cpufreq/cpufreq_06.sh +++ b/cpufreq/cpufreq_06.sh @@ -31,7 +31,7 @@ CPUCYCLE=../utils/cpucycle freq_results_array="results"
compute_freq_ratio() { - index=0 + #index=0 cpu=$1 freq=$2
@@ -49,25 +49,21 @@ compute_freq_ratio() { }
compute_freq_ratio_sum() { - index=0 - sum=0 + #index=0 + #sum=0
res=$(eval echo $$freq_results_array$index) sum=$(echo $sum $res | awk '{ printf "%f", $1 + $2 }') index=$((index + 1)) - }
__check_freq_deviation() { res=$(eval echo $$freq_results_array$index) - if [ ! -z "$res" ]; then # compute deviation dev=$(echo $res $avg | awk '{printf "%.3f", (($1 - $2) / $2) * 100}') - # change to absolute dev=$(echo $dev | awk '{ print ($1 >= 0) ? $1 : 0 - $1}') - index=$((index + 1)) res=$(echo $dev | awk '{printf "%f", ($dev > 5.0)}')
@@ -85,23 +81,20 @@ check_freq_deviation() {
cpu=$1 freq=$2 - check "deviation for frequency $(frequnit $freq)" __check_freq_deviation - }
check_deviation() {
cpu=$1 - set_governor $cpu userspace - + index=0 for_each_frequency $cpu compute_freq_ratio - + index=0;sum=0 for_each_frequency $cpu compute_freq_ratio_sum
avg=$(echo $sum $index | awk '{ printf "%.3f", $1 / $2}') - + index=0 for_each_frequency $cpu check_freq_deviation }
-- 2.5.0
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
On 05/05/2016 12:06 PM, Saul Romero wrote:
Changes in cpufreq_06.sh to calculate summatory and average of frequency measurements.
Signed-off-by: Saul Romero saul.romero@arm.com
Hi Saul,
can you elaborate in the changelog what happens with the current and why it must be fixed. Also, a proper fix should not comment the code.
Thanks.
-- Daniel
Hello Daniel: Where do you want me to elaborate more about this fix? Is it in the comments section so amend the patch? Thanks!
________________________________________ From: Daniel Lezcano daniel.lezcano@linaro.org Sent: 09 May 2016 09:24:45 To: Saul Romero; lisa.nguyen@linaro.org Cc: linaro-dev@lists.linaro.org; Basil Eljuse Subject: Re: [PATCH PM-QA] Fixed array initializations to calculate freq deviation.
On 05/05/2016 12:06 PM, Saul Romero wrote:
Changes in cpufreq_06.sh to calculate summatory and average of frequency measurements.
Signed-off-by: Saul Romero saul.romero@arm.com
Hi Saul,
can you elaborate in the changelog what happens with the current and why it must be fixed. Also, a proper fix should not comment the code.
Thanks.
-- Daniel
-- http://www.linaro.org/ Linaro.org │ Open source software for ARM SoCs
Follow Linaro: http://www.facebook.com/pages/Linaro Facebook | http://twitter.com/#!/linaroorg Twitter | http://www.linaro.org/linaro-blog/ Blog
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
On 12 May 2016 at 03:02, Saul Romero Saul.Romero@arm.com wrote:
Hello Daniel: Where do you want me to elaborate more about this fix? Is it in the comments section so amend the patch? Thanks!
Hi Saul,
You'd elaborate more about your fix in your commit message. So far your commit message is, "Changes in cpufreq_06.sh to calculate summatory and average of frequency measurements, " which doesn't give Daniel and the others a good idea what you're trying to achieve. As Daniel suggested, explain what you were seeing before and how your patch would help solve the bug/issue or improve something. Then it'll be easier for everyone to give better feedback.
Also, when you resubmit the patch, please update the subject to "PATCH PM-QA v2" (or whatever version you're on), so we can look at the latest one with the updated commit message.
Sorry for not seeing this sooner. Use the --amend option to update your patch.
From: Daniel Lezcano daniel.lezcano@linaro.org Sent: 09 May 2016 09:24:45 To: Saul Romero; lisa.nguyen@linaro.org Cc: linaro-dev@lists.linaro.org; Basil Eljuse Subject: Re: [PATCH PM-QA] Fixed array initializations to calculate freq deviation.
On 05/05/2016 12:06 PM, Saul Romero wrote:
Changes in cpufreq_06.sh to calculate summatory and average of frequency measurements.
Signed-off-by: Saul Romero saul.romero@arm.com
Hi Saul,
can you elaborate in the changelog what happens with the current and why it must be fixed. Also, a proper fix should not comment the code.
Thanks.
-- Daniel
-- http://www.linaro.org/ Linaro.org │ Open source software for ARM SoCs
Follow Linaro: http://www.facebook.com/pages/Linaro Facebook | http://twitter.com/#!/linaroorg Twitter | http://www.linaro.org/linaro-blog/ Blog
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
On 16 May 2016 at 14:21, Lisa Nguyen lisa.nguyen@linaro.org wrote:
On 12 May 2016 at 03:02, Saul Romero Saul.Romero@arm.com wrote:
Hello Daniel: Where do you want me to elaborate more about this fix? Is it in the comments section so amend the patch? Thanks!
Hi Saul,
You'd elaborate more about your fix in your commit message. So far your commit message is, "Changes in cpufreq_06.sh to calculate summatory and average of frequency measurements, " which doesn't give Daniel and the others a good idea what you're trying to achieve. As Daniel suggested, explain what you were seeing before and how your patch would help solve the bug/issue or improve something. Then it'll be easier for everyone to give better feedback.
Also, when you resubmit the patch, please update the subject to "PATCH PM-QA v2" (or whatever version you're on), so we can look at the latest one with the updated commit message.
Sorry for not seeing this sooner. Use the --amend option to update your patch.
Oh, I just noticed that your Signed-off-by line says "Signed-off-by: Saul Romero saul.romero@linaro.org", but you sent your patch from Saul.Romero@arm.com. I'm assuming that it's a typo?
From: Daniel Lezcano daniel.lezcano@linaro.org Sent: 09 May 2016 09:24:45 To: Saul Romero; lisa.nguyen@linaro.org Cc: linaro-dev@lists.linaro.org; Basil Eljuse Subject: Re: [PATCH PM-QA] Fixed array initializations to calculate freq deviation.
On 05/05/2016 12:06 PM, Saul Romero wrote:
Changes in cpufreq_06.sh to calculate summatory and average of frequency measurements.
Signed-off-by: Saul Romero saul.romero@arm.com
Hi Saul,
can you elaborate in the changelog what happens with the current and why it must be fixed. Also, a proper fix should not comment the code.
Thanks.
-- Daniel
-- http://www.linaro.org/ Linaro.org │ Open source software for ARM SoCs
Follow Linaro: http://www.facebook.com/pages/Linaro Facebook | http://twitter.com/#!/linaroorg Twitter | http://www.linaro.org/linaro-blog/ Blog
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.