From: Feng Tang <feng.tang@intel.com>
To: Chris Bainbridge <chris.bainbridge@gmail.com>
Cc: <paulmck@kernel.org>, <tglx@linutronix.de>, <sboyd@kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: PROBLEM: skew message does not handle negative ns skew
Date: Tue, 6 Jun 2023 21:52:11 +0800 [thread overview]
Message-ID: <ZH86C4A4qpeAz/n4@feng-clx> (raw)
In-Reply-To: <CAP-bSRa3_Janfh0yAnwmG=bh9niNUjWRPG2fQqc2SxcQR=OHGA@mail.gmail.com>
On Tue, Jun 06, 2023 at 02:09:08PM +0100, Chris Bainbridge wrote:
> On Tue, 6 Jun 2023 at 13:50, Feng Tang <feng.tang@intel.com> wrote:
> >
> > And I'm have no idea if there is a real hardware/firmware issue
> > or just a false alarm.
>
> Is a negative reported skew valid? I don't know, I had assumed so, so
> the problem was the conversion from -878159 ns to 18446744073708 ms.
I think it's valid. The related code is from kernel/time/clocksource.c:
"
cs_wd_msec = div_u64_rem(cs_nsec - wd_nsec, 1000U * 1000U, &wd_rem);
wd_msec = div_u64_rem(wd_nsec, 1000U * 1000U, &wd_rem);
pr_warn(" Clocksource '%s' skewed %lld ns (%lld ms) over watchdog '%s' interval of %lld ns (%lld ms)\n",
cs->name, cs_nsec - wd_nsec, cs_wd_msec, watchdog->name, wd_nsec, wd_msec);
"
The negative value just means the watchdog is running faster than
TSC in the 512 ms checking interval. The 18446744073708 ms is just
a conversion from s64 value in ns (-878159) to a u64 ns, then a
u64 ms.
Thanks,
Feng
next prev parent reply other threads:[~2023-06-06 13:59 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAP-bSRZuLhZQ4Kpb4NRF2yY6XifYpB3ei4=6oFDAaG+OmeGebQ@mail.gmail.com>
2023-06-06 11:28 ` PROBLEM: skew message does not handle negative ns skew Feng Tang
2023-06-06 12:28 ` Chris Bainbridge
2023-06-06 12:42 ` Feng Tang
2023-06-06 13:09 ` Chris Bainbridge
2023-06-06 13:52 ` Feng Tang [this message]
2023-06-07 19:04 ` Paul E. McKenney
2023-06-08 6:29 ` Feng Tang
2023-06-08 9:41 ` Chris Bainbridge
2023-06-08 16:25 ` Paul E. McKenney
2023-06-08 16:27 ` Chris Bainbridge
2023-06-08 16:42 ` Paul E. McKenney
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=ZH86C4A4qpeAz/n4@feng-clx \
--to=feng.tang@intel.com \
--cc=chris.bainbridge@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=paulmck@kernel.org \
--cc=sboyd@kernel.org \
--cc=tglx@linutronix.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.