mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
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:54:44 +0400	[thread overview]
Message-ID: <20100416145444.GB5540@lenovo> (raw)
In-Reply-To: <20100416144616.GC5162@nowhere>

On Fri, Apr 16, 2010 at 04:46:17PM +0200, Frederic Weisbecker wrote:
...
> > > > +		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
> 
> 
> The cpu mask is not per cpu here, this is a shared bitmap, so you
> can race against other cpus NMIs.
> 
> That said, as I suggested, having a per cpu var that we set when we
> warned would be much better than a spinlock here.
> 

yeah, saw DECLARE_BITMAP but read it as DEFINE_PER_CPU for some reason.
having any spinlock in irq handler is really under suspicious.

	-- Cyrill

  parent reply	other threads:[~2010-04-16 14:54 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-15 21:25 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
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 [this message]
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=20100416145444.GB5540@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 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®