Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1627733

Re: [PATCH 2/2] tick: Make sure tick timer is active when bypassing reprogramming

From Frederic Weisbecker <fweisbec@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH 2/2] tick: Make sure tick timer is active when bypassing reprogramming
Date 2017-04-20 20:30 +0200
Message-ID <typ06-3Ua-17@gated-at.bofh.it> (permalink)
References <tymlz-2fX-3@gated-at.bofh.it> <tymlA-2fX-19@gated-at.bofh.it> <tyox4-3vH-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Apr 20, 2017 at 07:56:22PM +0200, Thomas Gleixner wrote:
> On Thu, 20 Apr 2017, Frederic Weisbecker wrote:
> 
> > So far we have run into too much troubles with the optimization path
> > that skips reprogramming the clock on IRQ exit when the expiration
> > deadline hasn't changed. If by accident the cached deadline happens to
> > be out of sync with the hardware deadline, the buggy result and its
> > cause are hard to investigate. So lets detect and warn about the issue
> > early.
> > 
> > Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
> > Cc: Tim Wright <tim@binbash.co.uk>
> > Cc: Pavel Machek <pavel@ucw.cz>
> > Cc: James Hartsock <hartsjc@redhat.com>
> > Cc: Peter Zijlstra <peterz@infradead.org>
> > Cc: Rik van Riel <riel@redhat.com>
> > Cc: Thomas Gleixner <tglx@linutronix.de>
> > Cc: Ingo Molnar <mingo@kernel.org>
> > ---
> >  kernel/time/tick-sched.c | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> > 
> > diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
> > index 502b320..eb1366e 100644
> > --- a/kernel/time/tick-sched.c
> > +++ b/kernel/time/tick-sched.c
> > @@ -783,8 +783,10 @@ static ktime_t tick_nohz_stop_sched_tick(struct tick_sched *ts,
> >  	tick = expires;
> >  
> >  	/* Skip reprogram of event if its not changed */
> > -	if (ts->tick_stopped && (expires == ts->next_tick))
> > +	if (ts->tick_stopped && (expires == ts->next_tick)) {
> > +		WARN_ON_ONCE(dev->next_event > ts->next_tick);
> 
> What about handling it proper ? dev->next_event might be KTIME_MAX,
> i.e. no more event for the next 500+ years.

I thought I handled this case, what I'm I missing?

> Thanks,
> 
> 	tglx

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/2] nohz: Deal with clock reprogram skipping issues Frederic Weisbecker <fweisbec@gmail.com> - 2017-04-20 17:40 +0200
  [PATCH 2/2] tick: Make sure tick timer is active when bypassing reprogramming Frederic Weisbecker <fweisbec@gmail.com> - 2017-04-20 17:40 +0200
    Re: [PATCH 2/2] tick: Make sure tick timer is active when bypassing  reprogramming Rik van Riel <riel@redhat.com> - 2017-04-20 18:10 +0200
    Re: [PATCH 2/2] tick: Make sure tick timer is active when bypassing  reprogramming Thomas Gleixner <tglx@linutronix.de> - 2017-04-20 20:00 +0200
      Re: [PATCH 2/2] tick: Make sure tick timer is active when bypassing  reprogramming Frederic Weisbecker <fweisbec@gmail.com> - 2017-04-20 20:30 +0200
        Re: [PATCH 2/2] tick: Make sure tick timer is active when bypassing  reprogramming Thomas Gleixner <tglx@linutronix.de> - 2017-04-20 21:50 +0200
          Re: [PATCH 2/2] tick: Make sure tick timer is active when bypassing  reprogramming Frederic Weisbecker <fweisbec@gmail.com> - 2017-04-21 01:30 +0200

csiph-web