timers: Reduce __run_timers() latency for empty list
The __run_timers() function currently steps through the list one jiffy at a time in order to update the timer wheel. However, if the timer wheel is empty, no adjustment is needed other than updating ->timer_jiffies. In this case, which is likely to be common for NO_HZ_FULL kernels, the kernel currently incurs a large latency for no good reason. This commit therefore short-circuits this case. Signed-off-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com> Reviewed-by: NJosh Triplett <josh@joshtriplett.org> Acked-by: NPeter Zijlstra <peterz@infradead.org> Reviewed-by: NOleg Nesterov <oleg@redhat.com> Reviewed-by: NSteven Rostedt <rostedt@goodmis.org> Tested-by: NMike Galbraith <bitbucket@online.de>
Showing
想要评论请 注册 或 登录