* Re: [PATCH -rt] timer: upper bound on loops of __run_timers processing
2015-01-14 17:21 ` [PATCH -rt] timer: upper bound on loops of __run_timers processing Marcelo Tosatti
@ 2015-01-14 17:41 ` Steven Rostedt
2015-01-26 21:12 ` Marcelo Tosatti
1 sibling, 0 replies; 4+ messages in thread
From: Steven Rostedt @ 2015-01-14 17:41 UTC (permalink / raw)
To: Marcelo Tosatti
Cc: Thomas Gleixner, Clark Williams, Luiz Capitulino, Rik van Riel,
linux-kernel, linux-rt-users
On Wed, 14 Jan 2015 15:21:47 -0200
Marcelo Tosatti <mtosatti@redhat.com> wrote:
>
> Ping?
>
Sorry, I've fallen behind since the holidays and still trying to catch
up. I'll try to look at this this week.
-- Steve
> On Tue, Dec 30, 2014 at 05:52:28PM -0200, Marcelo Tosatti wrote:
> >
> > Commit "timers: do not raise softirq unconditionally", allows for timer
> > wheel processing (__run_timers) to be delayed for long periods of time.
> >
> > The effect is that
> >
> > loops = jiffies - base->timer_jiffies
> >
> > Can grow to very large values resulting in __run_timers taking hundreds
> > of milliseconds to execute.
> >
> > Fix by creating an upper bound on the number of loops to be processed.
> > This allows a nohz=off kernel to achieve desired latencies.
> >
> > Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
> >
> > diff --git a/kernel/timer.c b/kernel/timer.c
> > index f59e18c..c128416 100644
> > --- a/kernel/timer.c
> > +++ b/kernel/timer.c
> > @@ -1488,6 +1488,12 @@ void run_local_timers(void)
> > }
> > #endif
> >
> > + if (time_after_eq(jiffies, base->timer_jiffies)) {
> > + unsigned long jiffies_delta = jiffies - base->timer_jiffies;
> > + if (jiffies_delta > TVR_SIZE)
> > + raise_softirq(TIMER_SOFTIRQ);
> > + }
> > +
> > if (!base->active_timers)
> > goto out;
> >
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH -rt] timer: upper bound on loops of __run_timers processing
2015-01-14 17:21 ` [PATCH -rt] timer: upper bound on loops of __run_timers processing Marcelo Tosatti
2015-01-14 17:41 ` Steven Rostedt
@ 2015-01-26 21:12 ` Marcelo Tosatti
2015-02-17 17:24 ` Sebastian Andrzej Siewior
1 sibling, 1 reply; 4+ messages in thread
From: Marcelo Tosatti @ 2015-01-26 21:12 UTC (permalink / raw)
To: Thomas Gleixner, Steven Rostedt
Cc: Clark Williams, Luiz Capitulino, Rik van Riel, linux-kernel,
linux-rt-users
Ping ?
On Wed, Jan 14, 2015 at 03:21:47PM -0200, Marcelo Tosatti wrote:
>
> Ping?
>
> On Tue, Dec 30, 2014 at 05:52:28PM -0200, Marcelo Tosatti wrote:
> >
> > Commit "timers: do not raise softirq unconditionally", allows for timer
> > wheel processing (__run_timers) to be delayed for long periods of time.
> >
> > The effect is that
> >
> > loops = jiffies - base->timer_jiffies
> >
> > Can grow to very large values resulting in __run_timers taking hundreds
> > of milliseconds to execute.
> >
> > Fix by creating an upper bound on the number of loops to be processed.
> > This allows a nohz=off kernel to achieve desired latencies.
> >
> > Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
> >
> > diff --git a/kernel/timer.c b/kernel/timer.c
> > index f59e18c..c128416 100644
> > --- a/kernel/timer.c
> > +++ b/kernel/timer.c
> > @@ -1488,6 +1488,12 @@ void run_local_timers(void)
> > }
> > #endif
> >
> > + if (time_after_eq(jiffies, base->timer_jiffies)) {
> > + unsigned long jiffies_delta = jiffies - base->timer_jiffies;
> > + if (jiffies_delta > TVR_SIZE)
> > + raise_softirq(TIMER_SOFTIRQ);
> > + }
> > +
> > if (!base->active_timers)
> > goto out;
> >
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread