cpuidle C-state accounting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I have a question about cpuidle C-state accounting in
cpuidle_idle_call() as implemented in kernel v2.6.29.

I understand it is possible for the target state entering callback to
return 0, if for some reason it could not enter the requested C-state
as decided by the governor. In this case, shouldn't the usage count be
updated conditionally to reflect the fact that the state may or may
not actually have been entered ? essentially, something like this:

--- cpuidle.c   2009-03-24 04:42:14.000000000 +0530
+++ cpuidle_modified.c  2009-05-19 11:39:58.000000000 +0530
@@ -86,7 +86,8 @@
                target_state = dev->last_state;

        target_state->time += (unsigned long long)dev->last_residency;
-       target_state->usage++;
+       if (dev->last_residency)
+               target_state->usage++;

        /* give the governor an opportunity to reflect on the outcome */
        if (cpuidle_curr_governor->reflect)


Cheers,
surinder
_______________________________________________
linux-pm mailing list
linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/linux-pm

[Index of Archives]     [Linux ACPI]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [CPU Freq]     [Kernel Newbies]     [Fedora Kernel]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux