mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: vigneshr@codeaurora.org
Cc: stfomichev@yandex-team.ru, linux-kernel@vger.kernel.org,
	john.stultz@linaro.org, viresh.kumar@linaro.org,
	fweisbec@gmail.com, mingo@kernel.org, cl@linux.com,
	psodagud@codeaurora.org, sboyd@codeaurora.org
Subject: RE: [PATCH v3] hrtimers: calculate expires_next after all timers are executed
Date: Thu, 22 Jan 2015 11:45:16 +0100 (CET)	[thread overview]
Message-ID: <alpine.DEB.2.11.1501221144210.5526@nanos> (raw)
In-Reply-To: <5575911c82b96b23fdcaeb71bde87e9e.squirrel@www.codeaurora.org>

On Wed, 21 Jan 2015, vigneshr@codeaurora.org wrote:

> Hi Thomas,
> 
> In this patch, we are only setting the flag
> cpu_base->in_hrtirq = 1; in hrtimer_interrupt() and not resetting it.
> 
> 
> > @@ -1251,9 +1251,9 @@ void hrtimer_interrupt(struct clock_even
> > dev->next_event.tv64 = KTIME_MAX;
> >
> > raw_spin_lock(&cpu_base->lock);
> > + cpu_base->in_hrtirq = 1;
> 
> Since this is the case, after the hrtimer_interrupt routine completes and
> new timer is started and say it happens to be leftmost,
> we don't allow hrtimer_reprogram() since we bail out given that
> cpu_base->in_hrtirq=1 :
> 
> timer irq comes
> --->hrtimer_interrupt()
> ---->cpu_base->in_hrtirq flag is set
> ------>Interrupt is serviced
> 
> After sometime
> 
> -->__hrtimer_start_range_ns()
> --->happens to be leftmost hence call hrtimer_enqueue_reprogram()
> ----->hrtimer_reprogram()
> ------->bail out since cpu_base->in_hrtirq flag is stil set
> 
> At the end of hrtimer interrupt routine, i think we should also clear this
> flag.

Bah, yes. I moved it around several times and then dropped it.
 
Thanks for spotting it!

       tglx

  reply	other threads:[~2015-01-22 10:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-21 12:56 vigneshr
2015-01-22 10:45 ` Thomas Gleixner [this message]
2015-01-22 12:35   ` Stanislav Fomichev
  -- strict thread matches above, loose matches on Subject: below --
2015-01-20 12:45 Stanislav Fomichev
2015-01-20 23:06 ` Thomas Gleixner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.11.1501221144210.5526@nanos \
    --to=tglx@linutronix.de \
    --cc=cl@linux.com \
    --cc=fweisbec@gmail.com \
    --cc=john.stultz@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=psodagud@codeaurora.org \
    --cc=sboyd@codeaurora.org \
    --cc=stfomichev@yandex-team.ru \
    --cc=vigneshr@codeaurora.org \
    --cc=viresh.kumar@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®