mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: tip-bot for Colin Ian King <colin.king@canonical.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
	eric.dumazet@gmail.com, a.p.zijlstra@chello.nl,
	stable@kernel.org, colin.king@canonical.com, tglx@linutronix.de,
	mingo@elte.hu
Subject: [tip:core/urgent] softlockup: Stop spurious softlockup messages due to overflow
Date: Mon, 22 Mar 2010 07:45:51 GMT	[thread overview]
Message-ID: <tip-8c2eb4805d422bdbf60ba00ff233c794d23c3c00@git.kernel.org> (raw)
In-Reply-To: <1268994482.1798.6.camel@lenovo>

Commit-ID:  8c2eb4805d422bdbf60ba00ff233c794d23c3c00
Gitweb:     http://git.kernel.org/tip/8c2eb4805d422bdbf60ba00ff233c794d23c3c00
Author:     Colin Ian King <colin.king@canonical.com>
AuthorDate: Fri, 19 Mar 2010 10:28:02 +0000
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Sun, 21 Mar 2010 19:30:13 +0100

softlockup: Stop spurious softlockup messages due to overflow

Ensure additions on touch_ts do not overflow.  This can occur
when the top 32 bits of the TSC reach 0xffffffff causing
additions to touch_ts to overflow and this in turn generates
spurious softlockup warnings.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Cc: <stable@kernel.org>
LKML-Reference: <1268994482.1798.6.camel@lenovo>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 kernel/softlockup.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/softlockup.c b/kernel/softlockup.c
index 0d4c789..4b493f6 100644
--- a/kernel/softlockup.c
+++ b/kernel/softlockup.c
@@ -155,11 +155,11 @@ void softlockup_tick(void)
 	 * Wake up the high-prio watchdog task twice per
 	 * threshold timespan.
 	 */
-	if (now > touch_ts + softlockup_thresh/2)
+	if (time_after(now - softlockup_thresh/2, touch_ts))
 		wake_up_process(per_cpu(softlockup_watchdog, this_cpu));
 
 	/* Warn about unreasonable delays: */
-	if (now <= (touch_ts + softlockup_thresh))
+	if (time_before_eq(now - softlockup_thresh, touch_ts))
 		return;
 
 	per_cpu(softlockup_print_ts, this_cpu) = touch_ts;

      reply	other threads:[~2010-03-22  7:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-15 14:01 [PATCH] softlockup: stop " Colin Ian King
2010-03-15 14:29 ` Eric Dumazet
2010-03-16 10:12   ` Ingo Molnar
2010-03-18 13:22     ` Colin Ian King
2010-03-18 15:25       ` Ingo Molnar
2010-03-18 20:45         ` Eric Dumazet
2010-03-19 10:28           ` Colin Ian King
2010-03-22  7:45             ` tip-bot for Colin Ian King [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=tip-8c2eb4805d422bdbf60ba00ff233c794d23c3c00@git.kernel.org \
    --to=colin.king@canonical.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=eric.dumazet@gmail.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mingo@redhat.com \
    --cc=stable@kernel.org \
    --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

Powered by JetHome