From: john stultz on
On Thu, 2010-07-22 at 20:13 -0700, john stultz wrote:
> diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c
> index 0e98497..a91e7ba 100644
> --- a/kernel/time/clocksource.c
> +++ b/kernel/time/clocksource.c
> @@ -280,7 +280,8 @@ static void clocksource_watchdog(unsigned long data)
> cs_nsec = clocksource_cyc2ns((csnow - cs->wd_last) &
> cs->mask, cs->mult, cs->shift);
> cs->wd_last = csnow;
> - if (abs(cs_nsec - wd_nsec) > WATCHDOG_THRESHOLD) {
> + if (jiffies - watchdog_timer.expires > 4*WATCHDOG_INTERVAL) &&
> + (abs(cs_nsec - wd_nsec) > WATCHDOG_THRESHOLD) {
> clocksource_unstable(cs, cs_nsec - wd_nsec);
> continue;
> }


Bah.

Was testing with this patch and just realized it has a thinko
(greater-than instead of less-than).

Should be:

diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c
index 0e98497..a91e7ba 100644
--- a/kernel/time/clocksource.c
+++ b/kernel/time/clocksource.c
@@ -280,7 +280,8 @@ static void clocksource_watchdog(unsigned long data)
cs_nsec = clocksource_cyc2ns((csnow - cs->wd_last) &
cs->mask, cs->mult, cs->shift);
cs->wd_last = csnow;
- if (abs(cs_nsec - wd_nsec) > WATCHDOG_THRESHOLD) {
+ if (jiffies - watchdog_timer.expires < 4*WATCHDOG_INTERVAL) &&
+ (abs(cs_nsec - wd_nsec) > WATCHDOG_THRESHOLD) {
clocksource_unstable(cs, cs_nsec - wd_nsec);
continue;
}


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/