From: Cyrill Gorcunov <gorcunov@gmail.com>
To: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Don Zickus <dzickus@redhat.com>,
mingo@elte.hu, peterz@infradead.org, aris@redhat.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] [watchdog] combine nmi_watchdog and softlockup
Date: Fri, 16 Apr 2010 18:32:32 +0400 [thread overview]
Message-ID: <20100416143232.GA5540@lenovo> (raw)
In-Reply-To: <20100416014712.GC15570@nowhere>
On Fri, Apr 16, 2010 at 03:47:14AM +0200, Frederic Weisbecker wrote:
[...]
> > +
> > +/* Callback function for perf event subsystem */
> > +void watchdog_overflow_callback(struct perf_event *event, int nmi,
> > + struct perf_sample_data *data,
> > + struct pt_regs *regs)
> > +{
> > + int this_cpu = smp_processor_id();
> > + unsigned long touch_ts = per_cpu(watchdog_touch_ts, this_cpu);
> > +
> > + if (touch_ts == 0) {
> > + __touch_watchdog();
> > + return;
> > + }
> > +
> > + /* check for a hardlockup
> > + * This is done by making sure our timer interrupt
> > + * is incrementing. The timer interrupt should have
> > + * fired multiple times before we overflow'd. If it hasn't
> > + * then this is a good indication the cpu is stuck
> > + */
> > + if (is_hardlockup(this_cpu)) {
> > + /* only print hardlockups once */
> > + if (cpumask_test_cpu(this_cpu, to_cpumask(hardlockup_mask)))
> > + return;
> > +
> > + if (hardlockup_panic)
> > + panic("Watchdog detected hard LOCKUP on cpu %d", this_cpu);
> > + else
> > + WARN(1, "Watchdog detected hard LOCKUP on cpu %d", this_cpu);
> > +
> > + cpumask_set_cpu(this_cpu, to_cpumask(hardlockup_mask));
>
>
>
> May be have an arch spin lock there to update your cpu mask safely.
>
Hmm, this is NMI handler path so from what we protect this per-cpu data?
Do I miss something? /me confused
-- Cyrill
next prev parent reply other threads:[~2010-04-16 14:38 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-15 21:25 [PATCH v2] [watchdog] combine nmi_watchdog and softlockup Don Zickus
2010-04-15 22:32 ` Randy Dunlap
2010-04-16 14:12 ` Don Zickus
2010-04-16 1:47 ` Frederic Weisbecker
2010-04-16 14:12 ` Don Zickus
2010-04-16 14:43 ` Frederic Weisbecker
2010-04-16 15:04 ` Don Zickus
2010-04-16 15:32 ` Frederic Weisbecker
2010-04-16 16:14 ` Don Zickus
2010-04-16 16:24 ` Frederic Weisbecker
2010-04-16 14:32 ` Cyrill Gorcunov [this message]
2010-04-16 14:46 ` Frederic Weisbecker
2010-04-16 14:53 ` Peter Zijlstra
2010-04-16 14:59 ` Frederic Weisbecker
2010-04-16 14:54 ` Cyrill Gorcunov
2010-04-16 14:46 ` Don Zickus
2010-04-19 21:21 ` Don Zickus
2010-04-19 21:35 ` Ingo Molnar
2010-04-19 21:51 ` Don Zickus
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=20100416143232.GA5540@lenovo \
--to=gorcunov@gmail.com \
--cc=aris@redhat.com \
--cc=dzickus@redhat.com \
--cc=fweisbec@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.