[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1279856054.2442.60.camel@localhost.localdomain>
Date: Thu, 22 Jul 2010 20:34:14 -0700
From: john stultz <johnstul@...ibm.com>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: lkml <linux-kernel@...r.kernel.org>,
Darren Hart <dvhltc@...ibm.com>,
Paul Clarke <pacman@...ibm.com>
Subject: Re: [RFC][PATCH -rt] Handling delayed clocksource watchdog timer
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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists