On Thu, 20 Jul 2017, Li, Aubrey wrote:
Don't get me wrong, even if a fast path is acceptable, we still need to
figure out if the coming idle is short and when to switch. I'm just worried
about if irq timings is not an ideal statistics, we have to skip it too.
There is no ideal solution ever.
Lets sit back and look at that from the big picture first before dismissing
a particular item upfront.
The current NOHZ implementation does:
predict = nohz_predict(timers, rcu, arch, irqwork);
if ((predict - now) > X)
stop_tick()
The C-State machinery does something like:
predict = cstate_predict(next_timer, scheduler);
cstate = cstate_select(predict);
That disconnect is part of the problem. What we really want is:
predict = idle_predict(timers, rcu, arch, irqwork, scheduler, irq timings);