From: Sanjeev Premi <premi@ti.com>
To: linux-kernel@vger.kernel.org
Cc: Sanjeev Premi <premi@ti.com>
Subject: [PATCHv3 0/1] PM : cpuidle - incorrect statistics
Date: Sat, 5 Sep 2009 01:04:12 +0530 [thread overview]
Message-ID: <1252092852-18320-1-git-send-email-premi@ti.com> (raw)
When 'enable_off_mode' is 0, the target power state for MPU
and Core is locally changed to PWRDM_POWER_RET but, the
statistics are updated for idle state originally selected
by the governor.
To debug the issue and validate the fix, added variables -
mpu_state_modified and core_state_modified. Both are
incremented in omap3_enter_idle() as below:
if (!enable_off_mode) {
if (mpu_state < PWRDM_POWER_RET) {
mpu_state_modified++;
mpu_state = PWRDM_POWER_RET;
}
if (core_state < PWRDM_POWER_RET) {
core_state_modified++;
core_state = PWRDM_POWER_RET;
}
}
Also added a sysfs entry to track these modifications.
Before the change:
...BOOT...
[root@OMAP3EVM /]#
[root@OMAP3EVM /]# cat /sys/power/enable_off_mode
0
[root@OMAP3EVM /]# cat /sys/power/enable_off_mode
0
[root@OMAP3EVM /]# cat /sys/power/track_modifs
[mpu_state_modified, core_state_modified] = [0 , 0]
[root@OMAP3EVM /]#
[root@OMAP3EVM /]#
[root@OMAP3EVM /]# echo 1 > /sys/power/sleep_while_idle
[root@OMAP3EVM /]#
...WAIT 5 SECS...
[root@OMAP3EVM /]# cat /sys/power/track_modifs
[mpu_state_modified, core_state_modified] = [5 , 3]
[root@OMAP3EVM /]# cat /sys/devices/system/cpu/cpu0/cpuidle/state6/usage
3
...WAIT FEW MORE SECS...
[root@OMAP3EVM /]# cat /sys/power/track_modifs
[mpu_state_modified, core_state_modified] = [27 , 25]
[root@OMAP3EVM /]# cat /sys/devices/system/cpu/cpu0/cpuidle/state6/usage
25
[root@OMAP3EVM /]# cat /sys/power/enable_off_mode
0
After the fix:
...BOOT...
[root@OMAP3EVM /]#
[root@OMAP3EVM /]# cat /sys/power/enable_off_mode
0
[root@OMAP3EVM /]# cat /sys/power/enable_off_mode
0
[root@OMAP3EVM /]# cat /sys/power/track_modifs
[mpu_state_modified, core_state_modified] = [0 , 0]
[root@OMAP3EVM /]#
[root@OMAP3EVM /]#
[root@OMAP3EVM /]# echo 1 > /sys/power/sleep_while_idle
[root@OMAP3EVM /]#
...WAIT 5 SECS...
[root@OMAP3EVM /]# cat /sys/power/track_modifs
[mpu_state_modified, core_state_modified] = [0 , 0]
[root@OMAP3EVM /]# cat /sys/devices/system/cpu/cpu0/cpuidle/state6/usage
0
[root@OMAP3EVM /]# echo 1 > /sys/power/sleep_while_idle
[root@OMAP3EVM /]#
...WAIT APPROX 10 SECS...
[root@OMAP3EVM /]# cat /sys/power/track_modifs
[mpu_state_modified, core_state_modified] = [0 , 0]
[root@OMAP3EVM /]# cat /sys/devices/system/cpu/cpu0/cpuidle/state6/usage
2
...WAIT APPROX 30 SECS...
[root@OMAP3EVM /]# cat /sys/power/track_modifs
[mpu_state_modified, core_state_modified] = [0 , 0]
[root@OMAP3EVM /]# cat /sys/devices/system/cpu/cpu0/cpuidle/state6/usage
17
[root@OMAP3EVM /]#
This topic was discussed earlier; but the final fix did not find its
way back.
[1] http://marc.info/?l=linux-omap&m=123681603821299&w=2
Sanjeev Premi (1):
PM : cpuidle - update statistics for correct state
arch/arm/mach-omap2/cpuidle34xx.c | 34 +++++++++++++++++++++++++++-------
arch/arm/mach-omap2/pm.h | 2 ++
arch/arm/mach-omap2/pm34xx.c | 2 ++
3 files changed, 31 insertions(+), 7 deletions(-)
reply other threads:[~2009-09-04 19:34 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1252092852-18320-1-git-send-email-premi@ti.com \
--to=premi@ti.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®