public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Frederic Weisbecker <fweisbec@gmail.com>
To: Don Zickus <dzickus@redhat.com>
Cc: mingo@elte.hu, peterz@infradead.org, gorcunov@gmail.com,
	aris@redhat.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] [watchdog] combine nmi_watchdog and softlockup
Date: Fri, 16 Apr 2010 17:32:12 +0200	[thread overview]
Message-ID: <20100416153210.GG5162@nowhere> (raw)
In-Reply-To: <20100416150407.GH15159@redhat.com>

On Fri, Apr 16, 2010 at 11:04:07AM -0400, Don Zickus wrote:
> > This is really just a corner case, I guess you don't need to
> > bother with that. It is actually racy against other cpus and adding
> > a spinlock here (in the everything is fine path) would be an overkill.
> > 
> > In fact, having two per cpu vars named hardlockup_warned and
> > softlockup_warned would be better than cpumasks. I'm sorry I
> > suggested you the cpumask, but such per cpu vars will avoid
> > you dealing with these synchonization issues. And one of the primary
> > rules is usually to never take a lock from NMIs if we can :)
> 
> Yeah, I guess per cpu is better.  I agree that locks in NMI are frowned
> upon but I wasn't sure of it was dealt with.


They work in fact. They are just not checked by lockdep.
And mostly they are very dangerous: if something else can
take it (from interrupt, from context) then this is a deadlock.
And even though we ensure this is only taken from NMI, we tend
to avoid that.


 
> I'll try to implement this.  Any objections if I combined hardlockup and
> softlockup with per cpu watchdog_warn and have bit masks for HARDLOCKUP
> and SOFTLOCKUP?  I hate to just waste per cpu space for this.



Hmm, a hardlockup can come in after a softlockup.
Don't worry too much about memory: usually the more you have cpu,
the more you have memory :)
Plus this is debugging code, not something supposed to be enabled
in production.


  reply	other threads:[~2010-04-16 15:32 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 [this message]
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
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=20100416153210.GG5162@nowhere \
    --to=fweisbec@gmail.com \
    --cc=aris@redhat.com \
    --cc=dzickus@redhat.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