lkml.org 
[lkml]   [2017]   [Oct]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC PATCH v2 7/8] cpuidle: introduce irq timing to make idle prediction
From
Date
On 2017/10/14 9:01, Rafael J. Wysocki wrote:
> On Saturday, September 30, 2017 9:20:33 AM CEST Aubrey Li wrote:
>> Introduce irq timings output as a factor to predict the duration
>> of the coming idle
>>
>> @@ -342,13 +343,27 @@ void cpuidle_entry_end(void)
>> void cpuidle_predict(void)
>> {
>> struct cpuidle_device *dev = cpuidle_get_device();
>> - unsigned int overhead_threshold;
>> + unsigned int idle_interval, overhead_threshold;
>> + u64 now, next_evt;
>>
>> if (!dev)
>> return;
>>
>> overhead_threshold = dev->idle_stat.overhead * sysctl_fast_idle_ratio;
>>
>> + /*
>> + * check irq timings if the next event is coming soon
>> + */
>> + now = local_clock();
>> + local_irq_disable();
>> + next_evt = irq_timings_next_event(now);
>> + local_irq_enable();
>> + idle_interval = div_u64(next_evt - now, NSEC_PER_USEC);
>
> Another division ...
>
okay, will replace with >>10 if micro-second is agreed to be the comparing unit

Thanks,
-Aubrey

\
 
 \ /
  Last update: 2017-10-16 08:04    [W:0.059 / U:0.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site