linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] hardlockup: detect hard lockups without NMIs using secondary cpus
Date: Thu, 10 Jan 2013 17:00:34 +0000	[thread overview]
Message-ID: <20130110170034.GG19944@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <CAFTL4hw_aRB8837stPgABFwHd9ifVqtV5Z5zX9MJ8rSFTSPNog@mail.gmail.com>

On Thu, Jan 10, 2013 at 05:18:40PM +0100, Frederic Weisbecker wrote:
> 2013/1/10 Russell King - ARM Linux <linux@arm.linux.org.uk>:
> > On Thu, Jan 10, 2013 at 09:02:15AM -0500, Don Zickus wrote:
> >> On Wed, Jan 09, 2013 at 05:57:39PM -0800, Colin Cross wrote:
> >> > Emulate NMIs on systems where they are not available by using timer
> >> > interrupts on other cpus.  Each cpu will use its softlockup hrtimer
> >> > to check that the next cpu is processing hrtimer interrupts by
> >> > verifying that a counter is increasing.
> >> >
> >> > This patch is useful on systems where the hardlockup detector is not
> >> > available due to a lack of NMIs, for example most ARM SoCs.
> >>
> >> I have seen other cpus, like Sparc I think, create a 'virtual NMI' by
> >> reserving an IRQ line as 'special' (can not be masked).  Not sure if that
> >> is something worth looking at here (or even possible).
> >
> > No it isn't, because that assumes that things like spin_lock_irqsave()
> > won't mask that interrupt.  We don't have the facility to do that.
> 
> I believe sparc is doing something like this though. Look at
> arch/sparc/include/asm/irqflags_64.h, it seems NMIs are implemented
> there using an irq number that is not masked by this function.

As I said, we don't have a facility to do that.

The CPU doesn't know about interrupt levels.  It's either all-IRQs-masked
or no-IRQs-masked.  If you want anything inbetween, you have to go outside
the CPU and fiddle with the IRQ controller, which may be one of _many_
different types, and some platforms even have a shadow IRQ controller.
Plus, doing such manipulation may in itself also require locking.

  reply	other threads:[~2013-01-10 17:00 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-10  1:57 [PATCH] hardlockup: detect hard lockups without NMIs using secondary cpus Colin Cross
2013-01-10 14:02 ` Don Zickus
2013-01-10 14:22   ` Russell King - ARM Linux
2013-01-10 16:18     ` Frederic Weisbecker
2013-01-10 17:00       ` Russell King - ARM Linux [this message]
2013-01-10 17:27   ` Colin Cross
2013-01-10 18:17     ` Don Zickus
2013-01-10 20:38 ` Tony Lindgren
2013-01-10 22:34   ` Colin Cross
2013-01-10 23:42     ` Tony Lindgren
2013-01-11  1:39 ` Liu, Chuansheng
2013-01-11  5:34   ` Colin Cross
2013-01-11  5:57     ` Liu, Chuansheng
2013-01-11  6:17       ` Colin Cross
2013-01-11  6:27         ` Liu, Chuansheng

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=20130110170034.GG19944@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=linux-arm-kernel@lists.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;
as well as URLs for NNTP newsgroup(s).