mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
time: track accurate idle time with tick_sched.idle_sleeptime
Current idle time in kstat is based on jiffies and is coarse grained. tick_sched.idle_sleeptime is making some attempt to keep track of idle time in a fine grained manner. But, it is not handling the time spent in interrupts fully. Make tick_sched.idle_sleeptime accurate with respect to time spent on handling interrupts and also add tick_sched.idle_lastupdate, which keeps track of last time when idle_sleeptime was updated. This statistics will be crucial for cpufreq-ondemand governor, which can shed some conservative gaurd band that is uses today while setting the frequency. The ondemand changes that uses the exact idle time is coming soon. Signed-off-by: Venkatesh Pallipadi <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]>
This commit is contained in:
parent
bbe4d18ac2
commit
6378ddb592
3 changed files with 60 additions and 23 deletions
|
|
@ -280,9 +280,14 @@ asmlinkage void do_softirq(void)
|
|||
*/
|
||||
void irq_enter(void)
|
||||
{
|
||||
#ifdef CONFIG_NO_HZ
|
||||
int cpu = smp_processor_id();
|
||||
if (idle_cpu(cpu) && !in_interrupt())
|
||||
tick_nohz_stop_idle(cpu);
|
||||
#endif
|
||||
__irq_enter();
|
||||
#ifdef CONFIG_NO_HZ
|
||||
if (idle_cpu(smp_processor_id()))
|
||||
if (idle_cpu(cpu))
|
||||
tick_nohz_update_jiffies();
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue