Re: [PATCH tip/core/timers 3/4] timers: Reduce future __run_timers() latency for newly emptied list

2014-01-15 Thread Paul E. McKenney
On Wed, Jan 15, 2014 at 06:08:35PM +0100, Oleg Nesterov wrote: > On 01/14, Paul E. McKenney wrote: > > > > @@ -700,6 +700,7 @@ static int detach_if_pending(struct timer_list *timer, > > struct tvec_base *base, > > base->next_timer = base->timer_jiffies; > > } > >

Re: [PATCH tip/core/timers 3/4] timers: Reduce future __run_timers() latency for newly emptied list

2014-01-15 Thread Paul E. McKenney
On Wed, Jan 15, 2014 at 03:54:05PM -0500, Steven Rostedt wrote: > On Tue, 14 Jan 2014 21:20:47 -0800 > "Paul E. McKenney" wrote: > > > > diff --git a/kernel/timer.c b/kernel/timer.c > > index 295837e5e011..bdd1c00ec4ec 100644 > > --- a/kernel/timer.c > > +++ b/kernel/timer.c > > @@ -700,6

Re: [PATCH tip/core/timers 3/4] timers: Reduce future __run_timers() latency for newly emptied list

2014-01-15 Thread Steven Rostedt
On Tue, 14 Jan 2014 21:20:47 -0800 "Paul E. McKenney" wrote: > diff --git a/kernel/timer.c b/kernel/timer.c > index 295837e5e011..bdd1c00ec4ec 100644 > --- a/kernel/timer.c > +++ b/kernel/timer.c > @@ -700,6 +700,7 @@ static int detach_if_pending(struct timer_list *timer, > struct tvec_base

Re: [PATCH tip/core/timers 3/4] timers: Reduce future __run_timers() latency for newly emptied list

2014-01-15 Thread Oleg Nesterov
On 01/14, Paul E. McKenney wrote: > > @@ -700,6 +700,7 @@ static int detach_if_pending(struct timer_list *timer, > struct tvec_base *base, > base->next_timer = base->timer_jiffies; > } > base->all_timers--; > + (void)catchup_timer_jiffies(base); Agreed, but

Re: [PATCH tip/core/timers 3/4] timers: Reduce future __run_timers() latency for newly emptied list

2014-01-15 Thread Oleg Nesterov
On 01/14, Paul E. McKenney wrote: @@ -700,6 +700,7 @@ static int detach_if_pending(struct timer_list *timer, struct tvec_base *base, base-next_timer = base-timer_jiffies; } base-all_timers--; + (void)catchup_timer_jiffies(base); Agreed, but I think

Re: [PATCH tip/core/timers 3/4] timers: Reduce future __run_timers() latency for newly emptied list

2014-01-15 Thread Steven Rostedt
On Tue, 14 Jan 2014 21:20:47 -0800 Paul E. McKenney paul...@linux.vnet.ibm.com wrote: diff --git a/kernel/timer.c b/kernel/timer.c index 295837e5e011..bdd1c00ec4ec 100644 --- a/kernel/timer.c +++ b/kernel/timer.c @@ -700,6 +700,7 @@ static int detach_if_pending(struct timer_list *timer,

Re: [PATCH tip/core/timers 3/4] timers: Reduce future __run_timers() latency for newly emptied list

2014-01-15 Thread Paul E. McKenney
On Wed, Jan 15, 2014 at 03:54:05PM -0500, Steven Rostedt wrote: On Tue, 14 Jan 2014 21:20:47 -0800 Paul E. McKenney paul...@linux.vnet.ibm.com wrote: diff --git a/kernel/timer.c b/kernel/timer.c index 295837e5e011..bdd1c00ec4ec 100644 --- a/kernel/timer.c +++ b/kernel/timer.c @@

Re: [PATCH tip/core/timers 3/4] timers: Reduce future __run_timers() latency for newly emptied list

2014-01-15 Thread Paul E. McKenney
On Wed, Jan 15, 2014 at 06:08:35PM +0100, Oleg Nesterov wrote: On 01/14, Paul E. McKenney wrote: @@ -700,6 +700,7 @@ static int detach_if_pending(struct timer_list *timer, struct tvec_base *base, base-next_timer = base-timer_jiffies; } base-all_timers--;

[PATCH tip/core/timers 3/4] timers: Reduce future __run_timers() latency for newly emptied 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. Therefore, if we just emptied the timer wheel, for

[PATCH tip/core/timers 3/4] timers: Reduce future __run_timers() latency for newly emptied 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. Therefore, if we just emptied