From: Thomas Gleixner <tglx@linutronix.de>
To: Jeff Merkey <linux.mdb@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
John Stultz <john.stultz@linaro.org>
Subject: Re: [BUG REPORT] ktime_get_ts64 causes Hard Lockup
Date: Wed, 20 Jan 2016 15:26:58 +0100 (CET) [thread overview]
Message-ID: <alpine.DEB.2.11.1601201350230.3575@nanos> (raw)
In-Reply-To: <alpine.DEB.2.11.1601201015000.3575@nanos>
Jeff,
On Wed, 20 Jan 2016, Thomas Gleixner wrote:
> On Tue, 19 Jan 2016, Jeff Merkey wrote:
> > Nasty bug but trivial fix for this. What happens here is RAX (nsecs)
> > gets set to a huge value (RAX = 0x17AE7F57C671EA7D) and passed through
>
> And how exactly does that happen?
>
> 0x17AE7F57C671EA7D = 1.70644e+18 nsec
> = 1.70644e+09 sec
> = 2.84407e+07 min
> = 474011 hrs
> = 19750.5 days
> = 54.1109 years
>
> That's the real issue, not what you are trying to 'fix' in timespec_add_ns()
And that's caused by stopping the whole machine for 20 minutes. It violates
the assumption of the timekeeping core, that the maximum time which is between
two updates of the core is < 5-10min. So that insane large number is caused by a
mult overrun when converting the time delta to nanoseconds.
You can find that limit via:
# dmesg | grep tsc | grep max_idle_ns
[ 5.242683] clocksource tsc: mask: 0xffffffffffffffff max_cycles: 0x21139a22526, max_idle_ns: 440795252169 ns
So on that machine the limit is:
440795252169 nsec
440.795 sec
7.34659 min
And before you ask or come up with patches: No, we are not going to add
anything to the core timekeeping code to work around this limitation simply
because its going to add overhead to a performance sensitive code path for a
very limited value.
Keeping a machine stopped for 20 minutes will make a lot of other things
unhappy, so introducing a 'fix' for that particular issue is just silly.
Thanks,
tglx
next prev parent reply other threads:[~2016-01-20 14:28 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-19 1:59 Jeff Merkey
2016-01-19 2:16 ` Jeff Merkey
2016-01-19 2:31 ` Jeff Merkey
2016-01-19 9:50 ` Thomas Gleixner
2016-01-19 15:37 ` Jeff Merkey
2016-01-19 22:00 ` Jeff Merkey
2016-01-20 0:59 ` Jeff Merkey
2016-01-20 9:21 ` Thomas Gleixner
2016-01-20 14:26 ` Thomas Gleixner [this message]
2016-01-20 16:40 ` Jeff Merkey
2016-01-20 16:53 ` Jeff Merkey
2016-01-20 17:16 ` Jeff Merkey
2016-01-20 17:32 ` John Stultz
2016-01-20 17:36 ` Jeff Merkey
2016-01-20 17:42 ` Thomas Gleixner
2016-01-20 17:59 ` John Stultz
2016-01-20 18:03 ` Jeff Merkey
2016-01-20 17:21 ` Thomas Gleixner
2016-01-20 17:33 ` Jeff Merkey
2016-01-20 19:34 ` Thomas Gleixner
2016-01-20 19:59 ` Jeff Merkey
2016-01-21 7:09 ` Jeff Merkey
2016-01-21 8:18 ` Jeff Merkey
2016-01-21 9:08 ` Jeff Merkey
2016-01-21 10:12 ` Thomas Gleixner
2016-01-21 15:46 ` Jeff Merkey
2016-01-21 16:57 ` Jeff Merkey
2016-01-21 17:00 ` Jeff Merkey
2016-01-21 17:07 ` Jeff Merkey
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.1601201350230.3575@nanos \
--to=tglx@linutronix.de \
--cc=john.stultz@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux.mdb@gmail.com \
/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®