From: dhylands@gmail.com (Dave Hylands)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Diff. between CPU Hard-lockup and Soft-lockup
Date: Tue, 31 Jan 2012 08:20:46 -0800 [thread overview]
Message-ID: <CABi1daFhZZEsQp75Lj2S4BnMZc5UZcLEedy34GVd3kFtxayScA@mail.gmail.com> (raw)
In-Reply-To: <CACsJYqqktn0pWPBGvpSDO8q+ECe6t=gENiyexnHxwAsrALMEHQ@mail.gmail.com>
Hi Devendra,
On Tue, Jan 31, 2012 at 1:28 AM, devendra rawat
<devendra.rawat.singh@gmail.com> wrote:
>
> Hi,
>
> What are the Differences between CPU Hard-lockup and Soft-lockup.
When the watchdog is enabled, there is a HW timer that counts down. If
the HW timer reaches 0, then it asserts (triggers an NMI or processor
RESET). Normally, the watchdog has something like a 30 second timeout,
and there is a watchdog thread which runs with a low real-time
priority. So that places it at a higher priority than all of the
normal threads.
The watchdog normally kicks (resets) the timer once per second. When
the timer reaches zero, then the hardlockup has considered to occur.
On some architectures, this will cause an NMI (non-maskable interrupt)
to fire. On architectures which don't support NMI, a reset will occur
(in the reset case you get no reporting of hard lockup - the processor
just reboots).
If the watchdog timer interrupt is running, but the watchdog thread is
not running for some period of time, then this is considered a soft
lockup. Because the watchdog timer interrupt is running, we know that
interrupts are enabled. The fact that the watchdog thread is not
running means either that context switching has been disabled, or some
interrupt or higher priority real-time thread is consuming 100% of the
CPU.
One common reason for hard-lockup is to disable interrupts and not
reenable them.
One common reason for soft lockup is when interrupts fire continuously
(typically happens when writing a new drive and you forgot to deal
with a particular interrupt source).
--
Dave Hylands
Shuswap, BC, Canada
http://www.davehylands.com
prev parent reply other threads:[~2012-01-31 16:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-31 9:28 Diff. between CPU Hard-lockup and Soft-lockup devendra rawat
2012-01-31 12:12 ` naveen yadav
2012-01-31 16:20 ` Dave Hylands [this message]
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=CABi1daFhZZEsQp75Lj2S4BnMZc5UZcLEedy34GVd3kFtxayScA@mail.gmail.com \
--to=dhylands@gmail.com \
--cc=kernelnewbies@lists.kernelnewbies.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).