From: Thomas Gleixner <tglx@linutronix.de>
To: Neeraj Upadhyay <neeraju@codeaurora.org>
Cc: sramana@codeaurora.org, sboyd@codeaurora.org,
LKML <linux-kernel@vger.kernel.org>,
John Stultz <john.stultz@linaro.org>
Subject: Re: Query regarding __hrtimer_get_next_event()
Date: Thu, 26 Oct 2017 14:57:41 +0200 (CEST) [thread overview]
Message-ID: <alpine.DEB.2.20.1710261455150.26875@nanos> (raw)
In-Reply-To: <2981b733-84ea-b46f-b16c-91aaa5a96c6c@codeaurora.org>
On Thu, 26 Oct 2017, Neeraj Upadhyay wrote:
> We have one query regarding the __hrtimer_get_next_event().
> The expires_next.tv64 is set to 0 if it is < 0. We observed
> an hrtimer interrupt storm for one of the hrtimers with
> below properties:
>
> * Expires for the hrtimer was set to KTIME_MAX.
> * cpu base was HRTIMER_BASE_REALTIME with negative base->offset.
> * Due to below sub, expires overflowed to a negative value and
> expires_next.tv64 was set to 0
> expires = ktime_sub(hrtimer_get_expires(timer), base->offset);
> * Due to this, clockevent was programmed to min_delta_ns, everytime
> as __hrtimer_get_next_event() returned 0.
>
>
> This may not be a valid use case (queuing a hrtimer with KTIME_MAX)
> expires, but should we guard the hrtimer next event code against
> this by using KTIME_MAX upper bound. Is something like below a
> proper way to guard it? Or am I missing something here?
Can you please explain how you managed to have a negative base->offset?
Thanks,
tglx
next prev parent reply other threads:[~2017-10-26 12:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-26 9:04 Neeraj Upadhyay
2017-10-26 12:57 ` Thomas Gleixner [this message]
2017-10-26 14:23 ` Neeraj Upadhyay
2017-10-27 7:32 ` 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.20.1710261455150.26875@nanos \
--to=tglx@linutronix.de \
--cc=john.stultz@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=neeraju@codeaurora.org \
--cc=sboyd@codeaurora.org \
--cc=sramana@codeaurora.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®