From: Don Zickus <dzickus@redhat.com>
To: Jeff Merkey <linux.mdb@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
akpm@linux-foundation.org, uobergfe@redhat.com,
atomlin@redhat.com, cmetcalf@ezchip.com, fweisbec@gmail.com
Subject: Re: [PATCH 1/1] Fix HARD Lockup Firing off while in debugger
Date: Mon, 14 Dec 2015 12:28:40 -0500 [thread overview]
Message-ID: <20151214172840.GB42652@redhat.com> (raw)
In-Reply-To: <CAO6TR8WftdbEWpS208iiu4xjzcDk8uwHA6a0wqRm-jLdaOncDQ@mail.gmail.com>
On Sat, Dec 12, 2015 at 02:08:13PM -0700, Jeff Merkey wrote:
> The current touch_nmi_watchdog() function in /kernel/watchdog.c does
> not always catch all cases when a processor is spinning in the nmi
> handler inside either KGDB, KDB, or MDB. The hrtimer_interrupts_saved
> count can still end up matching the previous value in some cases,
> resulting in the hard lockup detector tagging processors inside a
Hi Jeff,
I am confused here, the 'touch_nmi_watchdog()' was supposed to block the
check for hrtimer_interrupts from happening. So if the check is still being
executed _after_ you executed touch_nmi_watchdog(), it would imply there was
about 10 seconds or so of time elapse from the touch command to the hrtimer
check.
So I am not sure how the below patch would fix this, other than just add
another 10 second delay (for a total of 20 seconds) to your timeout?
> debugger and executing a panic. The patch below corrects this
> problem. I did not add this to the touch_nmi_function directly
> becuase of possible affects on timing issues.
>
> I have tested this patch and it fixes the problem for kernel debuggers
> stopping errant hard lockup events when processors are spinning inside
> the debugger.
The kernel doesn't normal take patches like this without a corresponding
user, which I didn't see attached in this patch or a patch series.
Cheers,
Don
>
>
> Signed-off-by: Jeff V. Merkey <jeffmerkey@gmail.com>
> diff --git a/kernel/watchdog.c b/kernel/watchdog.c
> index 18f34cf..b682aab 100644
> --- a/kernel/watchdog.c
> +++ b/kernel/watchdog.c
> @@ -283,6 +283,13 @@ static bool is_hardlockup(void)
> __this_cpu_write(hrtimer_interrupts_saved, hrint);
> return false;
> }
> +
> +void touch_hardlockup_watchdog(void)
> +{
> + __this_cpu_write(hrtimer_interrupts_saved, 0);
> +}
> +EXPORT_SYMBOL_GPL(touch_hardlockup_watchdog);
> +
> #endif
>
> static int is_softlockup(unsigned long touch_ts)
next prev parent reply other threads:[~2015-12-14 17:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-12 21:08 [PATCH 1/1] Fix HARD Lockup Firing off while in debugger Jeff Merkey
2015-12-12 21:19 ` Jeff Merkey
2015-12-14 17:28 ` Don Zickus [this message]
2015-12-15 2:59 ` Jeff Merkey
2015-12-15 3:18 ` Jeff Merkey
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=20151214172840.GB42652@redhat.com \
--to=dzickus@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=atomlin@redhat.com \
--cc=cmetcalf@ezchip.com \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux.mdb@gmail.com \
--cc=uobergfe@redhat.com \
/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