Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Nov 2002 20:47:27 -0800 (PST)
From:      Doug Ambrisko <ambrisko@ambrisko.com>
To:        Poul-Henning Kamp <phk@critter.freebsd.dk>
Cc:        Jeff Roberson <jroberson@chesapeake.net>, arch@FreeBSD.ORG
Subject:   Re: Software Watchdog
Message-ID:  <200211190447.gAJ4lRTN099876@www.ambrisko.com>
In-Reply-To: <5011.1037437534@critter.freebsd.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
Poul-Henning Kamp writes:
| In message <20021115191632.U22491-100000@mail.chesapeake.net>, Jeff Roberson wr
| ites:
| >Sean Kelly has implemented a software watchdog based on input from myself
| >and Peter.  This works through a simple watcdog daemon that checks in with
| >the kernel every so often.  The kernel complains via hardclock() if the
| >watchdog times out.  This will be very useful for debugging hard lockups
| >because hardclock() comes in through a fast intr.  There are few things
| >that will stop hardclock() from firing.
| 
| Does it have hooks for supporting hardware watchdogs ?

I've done something similar that hooks into HW watchdogs via a systctl
so you can kldload a HW watchdog.  I haven't put much effort into it
except to make it work for us in our environment until we know the 
direction of FreeBSD.

One thing that would make things easier is to extend the syctl stuff
in the kernel such that you could just call it and not have to find the
syctl that you need.

	http://www.ambrisko.com/doug/watchdog

Also I need to add guards for bounds.  The idea is to use the HW watchdog
to enforce the SW watchdog.  Ideally the SW watchdog will go off and 
give you a trace.  If the machine is so dead the SW one is broken
then the HW watchdog will reset it.

I think "dynamically" linking it in via sysctl makes things easier.
HW watchdogs are very common in newer PC's to deal with TCO stuff.
Some things there are used for in the BIOS is to try different timings
until the machine doesn't lock up for example.  Also it is then easy
to disable the HW watchdog before entering ddb etc by call the sysctl
to disable it.

Sounds reasonable ... stupid????  It's helped us.

Doug A.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200211190447.gAJ4lRTN099876>