lkml.org 
[lkml]   [2015]   [Apr]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v1] watchdog: Use a reference cycle counter to avoid scaling issues
> We can just detect the deviation in the callback itself:
>
> u64 now = ktime_get_mono_fast_ns();
>
> if (now - __this_cpu_read(nmi_timestamp) < period)
> return;
>
> __this_cpu_write(nmi_timestamp, now);
>
> It's that simple.

It's a simple short term hac^wsolution. But if we had a (hypothetical) system with
let's say 10*TSC max you may end up with quite a few false ticks, as in
unnecessary interrupts. With 100*TSC it would be really bad.

There were systems in the past that ran TSC at a much slower frequency,
such as the early AMD Barcelona systems.

So the problem may eventually come back if not solved properly.

-Andi

--
ak@linux.intel.com -- Speaking for myself only


\
 
 \ /
  Last update: 2015-04-24 03:21    [W:1.262 / U:0.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site