Re: [PATCH tip/core/timers 2/4] timers: Reduce __run_timers() latency for empty list

2014-01-15 Thread Paul E. McKenney
On Wed, Jan 15, 2014 at 12:33:55PM -0800, Josh Triplett wrote: > On Tue, Jan 14, 2014 at 09:20:46PM -0800, Paul E. McKenney wrote: > > From: "Paul E. McKenney" > > > > The __run_timers() function currently steps through the list one jiffy at > > a time in order to update the timer wheel.

Re: [PATCH tip/core/timers 2/4] timers: Reduce __run_timers() latency for empty list

2014-01-15 Thread Paul E. McKenney
On Wed, Jan 15, 2014 at 03:47:10PM -0500, Steven Rostedt wrote: > On Wed, 15 Jan 2014 12:32:45 -0800 > Josh Triplett wrote: > > > On Wed, Jan 15, 2014 at 06:38:58PM +0100, Oleg Nesterov wrote: > > > forgot to mention... > > > > > > On 01/14, Paul E. McKenney wrote: > > > > > > > > +static bool

Re: [PATCH tip/core/timers 2/4] timers: Reduce __run_timers() latency for empty list

2014-01-15 Thread Paul E. McKenney
On Wed, Jan 15, 2014 at 06:03:10PM +0100, Oleg Nesterov wrote: > On 01/14, Paul E. McKenney wrote: > > > > The __run_timers() function currently steps through the list one jiffy at > > a time > > And this is very suboptimal if jiffies - timer_jiffies is huge. Looks > like, we should rework

Re: [PATCH tip/core/timers 2/4] timers: Reduce __run_timers() latency for empty list

2014-01-15 Thread Steven Rostedt
On Wed, 15 Jan 2014 12:32:45 -0800 Josh Triplett wrote: > On Wed, Jan 15, 2014 at 06:38:58PM +0100, Oleg Nesterov wrote: > > forgot to mention... > > > > On 01/14, Paul E. McKenney wrote: > > > > > > +static bool catchup_timer_jiffies(struct tvec_base *base) > > > +{ > > > +#ifdef

Re: [PATCH tip/core/timers 2/4] timers: Reduce __run_timers() latency for empty list

2014-01-15 Thread Josh Triplett
On Tue, Jan 14, 2014 at 09:20:46PM -0800, Paul E. McKenney wrote: > From: "Paul E. McKenney" > > 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

Re: [PATCH tip/core/timers 2/4] timers: Reduce __run_timers() latency for empty list

2014-01-15 Thread Josh Triplett
On Wed, Jan 15, 2014 at 06:38:58PM +0100, Oleg Nesterov wrote: > forgot to mention... > > On 01/14, Paul E. McKenney wrote: > > > > +static bool catchup_timer_jiffies(struct tvec_base *base) > > +{ > > +#ifdef CONFIG_NO_HZ_FULL > > + if (!base->all_timers) { > > + base->timer_jiffies

Re: [PATCH tip/core/timers 2/4] timers: Reduce __run_timers() latency for empty list

2014-01-15 Thread Oleg Nesterov
forgot to mention... On 01/14, Paul E. McKenney wrote: > > +static bool catchup_timer_jiffies(struct tvec_base *base) > +{ > +#ifdef CONFIG_NO_HZ_FULL > + if (!base->all_timers) { > + base->timer_jiffies = jiffies; > + return 1; > + } > +#endif /* #ifdef

Re: [PATCH tip/core/timers 2/4] timers: Reduce __run_timers() latency for empty list

2014-01-15 Thread Peter Zijlstra
On Wed, Jan 15, 2014 at 06:03:10PM +0100, Oleg Nesterov wrote: > On 01/14, Paul E. McKenney wrote: > > > > The __run_timers() function currently steps through the list one jiffy at > > a time > > And this is very suboptimal if jiffies - timer_jiffies is huge. Looks > like, we should rework

Re: [PATCH tip/core/timers 2/4] timers: Reduce __run_timers() latency for empty list

2014-01-15 Thread Oleg Nesterov
On 01/14, Paul E. McKenney wrote: > > The __run_timers() function currently steps through the list one jiffy at > a time And this is very suboptimal if jiffies - timer_jiffies is huge. Looks like, we should rework base->tv* structures, or (perhaps) optimize the "cascade" logic so that

Re: [PATCH tip/core/timers 2/4] timers: Reduce __run_timers() latency for empty list

2014-01-15 Thread Oleg Nesterov
On 01/14, Paul E. McKenney wrote: The __run_timers() function currently steps through the list one jiffy at a time And this is very suboptimal if jiffies - timer_jiffies is huge. Looks like, we should rework base-tv* structures, or (perhaps) optimize the cascade logic so that __run_timers()

Re: [PATCH tip/core/timers 2/4] timers: Reduce __run_timers() latency for empty list

2014-01-15 Thread Peter Zijlstra
On Wed, Jan 15, 2014 at 06:03:10PM +0100, Oleg Nesterov wrote: On 01/14, Paul E. McKenney wrote: The __run_timers() function currently steps through the list one jiffy at a time And this is very suboptimal if jiffies - timer_jiffies is huge. Looks like, we should rework base-tv*

Re: [PATCH tip/core/timers 2/4] timers: Reduce __run_timers() latency for empty list

2014-01-15 Thread Oleg Nesterov
forgot to mention... On 01/14, Paul E. McKenney wrote: +static bool catchup_timer_jiffies(struct tvec_base *base) +{ +#ifdef CONFIG_NO_HZ_FULL + if (!base-all_timers) { + base-timer_jiffies = jiffies; + return 1; + } +#endif /* #ifdef CONFIG_NO_HZ_FULL */

Re: [PATCH tip/core/timers 2/4] timers: Reduce __run_timers() latency for empty list

2014-01-15 Thread Josh Triplett
On Wed, Jan 15, 2014 at 06:38:58PM +0100, Oleg Nesterov wrote: forgot to mention... On 01/14, Paul E. McKenney wrote: +static bool catchup_timer_jiffies(struct tvec_base *base) +{ +#ifdef CONFIG_NO_HZ_FULL + if (!base-all_timers) { + base-timer_jiffies = jiffies; +

Re: [PATCH tip/core/timers 2/4] timers: Reduce __run_timers() latency for empty list

2014-01-15 Thread Josh Triplett
On Tue, Jan 14, 2014 at 09:20:46PM -0800, Paul E. McKenney wrote: From: Paul E. McKenney paul...@linux.vnet.ibm.com 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

Re: [PATCH tip/core/timers 2/4] timers: Reduce __run_timers() latency for empty list

2014-01-15 Thread Steven Rostedt
On Wed, 15 Jan 2014 12:32:45 -0800 Josh Triplett j...@joshtriplett.org wrote: On Wed, Jan 15, 2014 at 06:38:58PM +0100, Oleg Nesterov wrote: forgot to mention... On 01/14, Paul E. McKenney wrote: +static bool catchup_timer_jiffies(struct tvec_base *base) +{ +#ifdef

Re: [PATCH tip/core/timers 2/4] timers: Reduce __run_timers() latency for empty list

2014-01-15 Thread Paul E. McKenney
On Wed, Jan 15, 2014 at 06:03:10PM +0100, Oleg Nesterov wrote: On 01/14, Paul E. McKenney wrote: The __run_timers() function currently steps through the list one jiffy at a time And this is very suboptimal if jiffies - timer_jiffies is huge. Looks like, we should rework base-tv*

Re: [PATCH tip/core/timers 2/4] timers: Reduce __run_timers() latency for empty list

2014-01-15 Thread Paul E. McKenney
On Wed, Jan 15, 2014 at 03:47:10PM -0500, Steven Rostedt wrote: On Wed, 15 Jan 2014 12:32:45 -0800 Josh Triplett j...@joshtriplett.org wrote: On Wed, Jan 15, 2014 at 06:38:58PM +0100, Oleg Nesterov wrote: forgot to mention... On 01/14, Paul E. McKenney wrote: +static bool

Re: [PATCH tip/core/timers 2/4] timers: Reduce __run_timers() latency for empty list

2014-01-15 Thread Paul E. McKenney
On Wed, Jan 15, 2014 at 12:33:55PM -0800, Josh Triplett wrote: On Tue, Jan 14, 2014 at 09:20:46PM -0800, Paul E. McKenney wrote: From: Paul E. McKenney paul...@linux.vnet.ibm.com The __run_timers() function currently steps through the list one jiffy at a time in order to update the timer

[PATCH tip/core/timers 2/4] timers: Reduce __run_timers() latency for empty list

2014-01-14 Thread Paul E. McKenney
From: "Paul E. McKenney" 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

[PATCH tip/core/timers 2/4] timers: Reduce __run_timers() latency for empty list

2014-01-14 Thread Paul E. McKenney
From: Paul E. McKenney paul...@linux.vnet.ibm.com 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