lkml.org 
[lkml]   [2016]   [Feb]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH V3 2/2] sched: idle: IRQ based next prediction for idle period
From
Date
On 02/22/2016 04:02 PM, Shreyas B Prabhu wrote:
> Hi Daniel,
>
> On 02/16/2016 09:13 PM, Daniel Lezcano wrote:
>> +
>> +/**
>> + * sched_idle_next_wakeup - Predict the next wakeup on the current cpu
>> + *
>> + * The next event on the cpu is based on a statistic approach of the
>> + * interrupt events and the timer deterministic value. From the timer
>> + * or the irqs, we return the one expected to occur first.
>> + *
>> + * Returns the expected remaining idle time before being woken up by
>> + * an interruption.
>> + */
>> +s64 sched_idle_next_wakeup(void)
>> +{
>> + s64 next_timer = ktime_to_us(tick_nohz_get_sleep_length());
>> + s64 next_irq = next_irq_event();
>
> Since next_irq_event() uses RCU and we are in idle this should probably
> be wrapped in RCU_NONIDLE().

That is a good point but the function is not supposed to be called in
the rcu_idle_enter/rcu_idle_exit section which is inside
cpuidle_idle_call().


--
<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

\
 
 \ /
  Last update: 2016-02-22 18:41    [W:0.094 / U:0.844 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site