From: Thomas Gleixner <tglx@linutronix.de>
To: John Stultz <john.stultz@linaro.org>
Cc: David Gibson <david@gibson.dropbear.id.au>,
lkml <linux-kernel@vger.kernel.org>,
Liav Rehana <liavr@mellanox.com>,
Chris Metcalf <cmetcalf@mellanox.com>,
Richard Cochran <richardcochran@gmail.com>,
Ingo Molnar <mingo@kernel.org>,
Prarit Bhargava <prarit@redhat.com>,
Laurent Vivier <lvivier@redhat.com>,
"Christopher S . Hall" <christopher.s.hall@intel.com>,
"4.6+" <stable@vger.kernel.org>,
Peter Zijlstra <peterz@infradead.org>
Subject: Re: [PATCH] timekeeping: Change type of nsec variable to unsigned in its calculation.
Date: Fri, 2 Dec 2016 00:08:21 +0100 (CET) [thread overview]
Message-ID: <alpine.DEB.2.20.1612020004090.3666@nanos> (raw)
In-Reply-To: <CALAqxLV6EJKLgcMsT4kY6CdBrUL9TO7CCjokXmafETFxfxUXBw@mail.gmail.com>
On Thu, 1 Dec 2016, John Stultz wrote:
> Yes, you're right here and apologies, as I wasn't being precise. In
> this case time does go backward, but its limited to within the current
> interval (just as it would be with a narrow clocksource wrapping
> fully). But without this patch, when the overflow occurs, if the
> signed bit is set, the signed shift pulls the sign bits down, the time
> can go backwards far beyond the current interval, which causes major
> wreckage.
Backwards is backwards, no matter how much. Depending on the computation
which sees the timejump you can end up with major crap as well. Think NTP,
PTP, PPS or whatever is able to tweak timekeeping in really bad ways.
Thanks,
tglx
next prev parent reply other threads:[~2016-12-01 23:11 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-19 4:53 [PATCH] timekeeping: Change type of nsec variable to unsigned in its calculation John Stultz
2016-11-28 22:50 ` John Stultz
2016-11-29 14:22 ` Thomas Gleixner
2016-11-29 23:57 ` David Gibson
2016-11-30 23:21 ` Thomas Gleixner
2016-12-01 2:12 ` David Gibson
2016-12-01 11:59 ` Thomas Gleixner
2016-12-01 20:23 ` John Stultz
2016-12-01 20:46 ` Thomas Gleixner
2016-12-01 21:19 ` John Stultz
2016-12-01 22:44 ` Thomas Gleixner
2016-12-01 23:03 ` John Stultz
2016-12-01 23:08 ` Thomas Gleixner [this message]
2016-12-01 23:32 ` David Gibson
2016-12-02 8:36 ` Thomas Gleixner
2016-12-03 0:33 ` David Gibson
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.1612020004090.3666@nanos \
--to=tglx@linutronix.de \
--cc=christopher.s.hall@intel.com \
--cc=cmetcalf@mellanox.com \
--cc=david@gibson.dropbear.id.au \
--cc=john.stultz@linaro.org \
--cc=liavr@mellanox.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lvivier@redhat.com \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=prarit@redhat.com \
--cc=richardcochran@gmail.com \
--cc=stable@vger.kernel.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