mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: john stultz <johnstul@us.ibm.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: lkml <linux-kernel@vger.kernel.org>,
	Darren Hart <dvhltc@us.ibm.com>, Paul Clarke <pacman@us.ibm.com>
Subject: Re: [RFC][PATCH -rt] Handling delayed clocksource watchdog timer
Date: Thu, 22 Jul 2010 20:34:14 -0700	[thread overview]
Message-ID: <1279856054.2442.60.camel@localhost.localdomain> (raw)
In-Reply-To: <1279854789.2442.54.camel@localhost.localdomain>

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;
 		}



      reply	other threads:[~2010-07-23  3:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-23  3:13 john stultz
2010-07-23  3:34 ` john stultz [this message]

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=1279856054.2442.60.camel@localhost.localdomain \
    --to=johnstul@us.ibm.com \
    --cc=dvhltc@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pacman@us.ibm.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®