Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1381919

Re: [RFC 1/2] time: workaround crappy hpet

From John Stultz <john.stultz@linaro.org>
Newsgroups linux.kernel
Subject Re: [RFC 1/2] time: workaround crappy hpet
Date 2016-04-18 19:10 +0200
Message-ID <rpkQr-Ms-31@gated-at.bofh.it> (permalink)
References <rmUQq-6Fz-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, Apr 11, 2016 at 5:57 PM, Shaohua Li <shli@fb.com> wrote:
> Calvin found 'perf record -a --call-graph dwarf -- sleep 5' making clocksource
> switching to hpet. We found similar symptom in another machine. Here is an example:
>
> [8224517.520885] timekeeping watchdog: Marking clocksource 'tsc' as unstable, because the skew is too large:
> [8224517.540032]        'hpet' wd_now: ffffffff wd_last: b39c0bd mask: ffffffff
> [8224517.553092]        'tsc' cs_now: 48ceac7013714e cs_last: 48ceac25be34ac mask: ffffffffffffffff
> [8224517.569849] Switched to clocksource hpet
>
> In both machines, wd_now is 0xffffffff. The tsc time looks correct, the cpu is 2.5G
> (0x48ceac7013714e - 0x48ceac25be34ac)/2500000 = 0.4988s
> 0.4988s matches WATCHDOG_INTERVAL. Since hpet reads to 0xffffffff in both
> machines, this sounds not coincidence, hept is crappy.
>
> This patch tries to workaround this issue. We do retry if hpet has 0xffffff value.
> In the relevant machine, the hpet counter doesn't read to 0xffffffff later.
> The chance hpet has 0xffffffff counter is very small, this patch should have no
> impact for good hpet.
>
> I'm open if there is better solution.

Hrm..

So can you characterize this bad behavior a bit more for us? Does
every read of the HPET return 0xFFFFFFFF ? Or does it just
occasionally start returning -1 values? Or once it trips and starts
returning -1 does it always return -1?

I'm trying to understand if there is a way to catch and disqualify
that clocksource earlier then in the watchdog logic.

thanks
-john

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Re: [RFC 1/2] time: workaround crappy hpet John Stultz <john.stultz@linaro.org> - 2016-04-18 19:10 +0200
  Re: [RFC 1/2] time: workaround crappy hpet Shaohua Li <shli@fb.com> - 2016-04-18 19:40 +0200
    Re: [RFC 1/2] time: workaround crappy hpet John Stultz <john.stultz@linaro.org> - 2016-04-18 19:50 +0200
      Re: [RFC 1/2] time: workaround crappy hpet Shaohua Li <shli@fb.com> - 2016-04-18 19:50 +0200
        Re: [RFC 1/2] time: workaround crappy hpet John Stultz <john.stultz@linaro.org> - 2016-04-18 20:00 +0200

csiph-web