From: Don Zickus <dzickus@redhat.com>
To: mingo@elte.hu
Cc: peterz@infradead.org, gorcunov@gmail.com, fweisbec@gmail.com,
linux-kernel@vger.kernel.org, Don Zickus <dzickus@redhat.com>
Subject: [PATCH 1/3] [lockup detector] sync touch_*_watchdog back to old semantics
Date: Tue, 31 Aug 2010 23:00:07 -0400 [thread overview]
Message-ID: <1283310009-22168-2-git-send-email-dzickus@redhat.com> (raw)
In-Reply-To: <1283310009-22168-1-git-send-email-dzickus@redhat.com>
During my rewrite, the semantics of touch_nmi_watchdog and
touch_softlockup_watchdog changed enough to break some drivers
(mostly over preemptable regions).
This change brings those touch_*_watchdog functions back in line
to how they used to work.
Signed-off-by: Don Zickus <dzickus@redhat.com>
---
kernel/watchdog.c | 17 ++++++++++++-----
1 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/kernel/watchdog.c b/kernel/watchdog.c
index 0d53c8e..7f9c3c5 100644
--- a/kernel/watchdog.c
+++ b/kernel/watchdog.c
@@ -122,7 +122,7 @@ static void __touch_watchdog(void)
void touch_softlockup_watchdog(void)
{
- __get_cpu_var(watchdog_touch_ts) = 0;
+ __raw_get_cpu_var(watchdog_touch_ts) = 0;
}
EXPORT_SYMBOL(touch_softlockup_watchdog);
@@ -142,7 +142,14 @@ void touch_all_softlockup_watchdogs(void)
#ifdef CONFIG_HARDLOCKUP_DETECTOR
void touch_nmi_watchdog(void)
{
- __get_cpu_var(watchdog_nmi_touch) = true;
+ if (watchdog_enabled) {
+ unsigned cpu;
+
+ for_each_present_cpu(cpu) {
+ if (per_cpu(watchdog_nmi_touch, cpu) != true)
+ per_cpu(watchdog_nmi_touch, cpu) = true;
+ }
+ }
touch_softlockup_watchdog();
}
EXPORT_SYMBOL(touch_nmi_watchdog);
@@ -433,6 +440,9 @@ static int watchdog_enable(int cpu)
wake_up_process(p);
}
+ /* if any cpu succeeds, watchdog is considered enabled for the system */
+ watchdog_enabled = 1;
+
return 0;
}
@@ -455,9 +465,6 @@ static void watchdog_disable(int cpu)
per_cpu(softlockup_watchdog, cpu) = NULL;
kthread_stop(p);
}
-
- /* if any cpu succeeds, watchdog is considered enabled for the system */
- watchdog_enabled = 1;
}
static void watchdog_enable_all_cpus(void)
--
1.7.2.2
next prev parent reply other threads:[~2010-09-01 3:00 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-01 3:00 [PATCH 0/3] lockup detector fixes Don Zickus
2010-09-01 3:00 ` Don Zickus [this message]
2010-09-01 5:30 ` [PATCH 1/3] [lockup detector] sync touch_*_watchdog back to old semantics Ingo Molnar
2010-09-01 6:00 ` Cyrill Gorcunov
2010-09-01 7:01 ` Cyrill Gorcunov
2010-09-01 7:20 ` Ingo Molnar
2010-09-01 7:42 ` Cyrill Gorcunov
2010-09-01 9:19 ` [tip:perf/urgent] lockup_detector: Sync " tip-bot for Don Zickus
2010-09-01 3:00 ` [PATCH 2/3] lockup_detector: convert cpu notifier to return encapsulate errno value Don Zickus
2010-09-01 6:24 ` [tip:perf/core] lockup_detector: Convert " tip-bot for Akinobu Mita
2010-09-01 3:00 ` [PATCH 3/3] lockup_detector: remove unnecessary panic_notifier Don Zickus
2010-09-01 6:25 ` [tip:perf/core] lockup_detector: Remove unused panic_notifier tip-bot for Akinobu Mita
-- strict thread matches above, loose matches on Subject: below --
2010-09-01 15:51 [PATCH 1/3] [lockup detector] sync touch_*_watchdog back to old semantics Don Zickus
2010-09-01 16:36 ` Cyrill Gorcunov
2010-09-01 17:15 ` Ingo Molnar
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=1283310009-22168-2-git-send-email-dzickus@redhat.com \
--to=dzickus@redhat.com \
--cc=fweisbec@gmail.com \
--cc=gorcunov@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
/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