From: Don Zickus <dzickus@redhat.com>
To: ZAK Magnus <zakmagnus@google.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] Track hard and soft "short lockups" or "stalls."
Date: Wed, 20 Jul 2011 11:41:24 -0400 [thread overview]
Message-ID: <20110720154124.GS3765@redhat.com> (raw)
In-Reply-To: <CAAuSN9106qmYF27oRrfUBtqwOmSQgDJWwv3iz_NmTTuYNEymHA@mail.gmail.com>
On Mon, Jul 18, 2011 at 02:45:55PM -0700, ZAK Magnus wrote:
> Okay, great. I'm eager to hear anything you may discover, good or bad. By
> the way, would you mind sharing a bit about how you do your testing for
> this?
Sorry for getting back to you late, busy week.
Most of the testing I do is from the lkdtm module
modprobe lkdtm
mount -t debugfs none /sys/kernel/debug
cd /sys/kernel/debug/provoke-crashing/
service cpuspeed stop
echo HARDLOCKUP > DIRECT #or SOFTLOCKUP or HUNG_TASK
I then count to 10 seconds to make sure the timer is within reason.
So I did the above test and noticed the panic looked funny because it spit
out the
new worst hard stall seen on CPU#0: 3 interrupts missed
and then
new worst hard stall seen on CPU#0: 4 interrupts missed
and then finally the HARDLOCKUP message
I am not sure that is what we want as it confuses people as to where the
panic really is.
What if you moved the 'update_hardstall()' to just underneath the zero'ing
out of the hrtimer_interrupts_missed? This only then prints out the
interrupts missed line when you know the end point. And avoids printing
it all together in the case of a true HARDLOCKUP. Like the patch below
diff --git a/kernel/watchdog.c b/kernel/watchdog.c
index 7d37cc2..ba41a74 100644
--- a/kernel/watchdog.c
+++ b/kernel/watchdog.c
@@ -238,13 +238,14 @@ static int is_hardlockup(int this_cpu)
if (hrint_saved == hrint)
ints_missed = per_cpu(hrtimer_interrupts_missed, this_cpu)++;
- else
+ else {
__this_cpu_write(hrtimer_interrupts_missed, 0);
+ update_hardstall(ints_missed, this_cpu);
+ }
if (ints_missed >= hardlockup_thresh)
return 1;
- update_hardstall(ints_missed, this_cpu);
return 0;
}
#endif
The softlockup case probably needs the same.
Thoughts?
Cheers,
Don
next prev parent reply other threads:[~2011-07-20 15:41 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-15 20:11 [PATCH v2] Track hard and soft "short lockups" or "stalls." Alex Neronskiy
2011-07-18 12:28 ` Don Zickus
[not found] ` <CAAuSN9106qmYF27oRrfUBtqwOmSQgDJWwv3iz_NmTTuYNEymHA@mail.gmail.com>
2011-07-20 15:41 ` Don Zickus [this message]
2011-07-20 19:41 ` ZAK Magnus
2011-07-20 21:07 ` Don Zickus
2011-07-20 21:15 ` ZAK Magnus
2011-07-21 14: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=20110720154124.GS3765@redhat.com \
--to=dzickus@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=zakmagnus@google.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.